Package: python-scipy Version: 0.10.1+dfsg1-3 Severity: serious Justification: fails to build from source (but built successfully in the past)
Please see attached a somewhat minimalistic code to reproduce the problem. it fails only on s390x -- fine on s390 and any other architecture/port where pymvpa2 was just built. Traceback (most recent call last): File "scipy-fx-failure2.py", line 65, in <module> 1.47441522, 1.78073152, 2.08704783, 2.39336413, 2.69968044])) File "scipy-fx-failure2.py", line 52, in least_sq_fit return leastsq(efx, params) File "/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py", line 324, in leastsq raise errors[info][1](errors[info][0]) TypeError: Improper input parameters. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing'), (600, 'unstable'), (300, 'experimental'), (100, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-scipy depends on: ii libamd2.2.0 1:3.4.0-2 ii libatlas3-base [liblapack.so.3gf] 3.8.4-7 ii libatlas3gf-base 3.8.4-7 ii libblas3 [libblas3gf] 1.2.20110419-5 ii libblas3gf 1.2.20110419-5 ii libc6 2.13-33 ii libgcc1 1:4.7.1-2 ii libgfortran3 4.7.1-2 ii liblapack3 [liblapack3gf] 3.4.1-4 ii liblapack3gf 3.4.1-4 ii libquadmath0 4.7.1-2 ii libstdc++6 4.7.1-2 ii libumfpack5.4.0 1:3.4.0-2 ii python 2.7.3~rc2-1 ii python-numpy [python-numpy-abi9] 1:1.6.2-1 ii python2.6 2.6.8-0.2 ii python2.7 2.7.3~rc2-2.1 Versions of packages python-scipy recommends: ii g++ [c++-compiler] 4:4.7.1-1 ii g++-4.4 [c++-compiler] 4.4.7-1 iu g++-4.6 [c++-compiler] 4.6.3-8 ii g++-4.7 [c++-compiler] 4.7.1-2 ii python-dev 2.7.3~rc2-1 ii python-imaging 1.1.7-4 Versions of packages python-scipy suggests: ii python [python-profiler] 2.7.3~rc2-1 -- no debconf information
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the PyMVPA package for the # copyright and license terms. # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## """Misc. functions (in the mathematical sense)""" __docformat__ = 'restructuredtext' import numpy as np from numpy import array from scipy.optimize import leastsq def dual_gaussian(x, amp1=1.0, mean1=0.0, std1=1.0, amp2=1.0, mean2=0.0, std2=1.0): from scipy.stats import norm print x if std1 <= 0 or std2 <= 0: return np.nan return (amp1 * norm.pdf(x, mean1, std1)) + (amp2 * norm.pdf(x, mean2, std2)) def least_sq_fit(fx, params, y, x=None, **kwargs): y = np.asanyarray(y) if len(y.shape) > 1: nsamp, ylen = y.shape else: nsamp, ylen = (1, len(y)) # contruct matching x-values if necessary if x is None: x = np.arange(ylen) # transform x and y into 1d arrays if nsamp > 1: x = np.array([x] * nsamp).ravel() y = y.ravel() # define error function def efx(p): print "EFX: ", p err = y - fx(x, *p, **kwargs) return err # do fit return leastsq(efx, params) if __name__ == '__main__': print least_sq_fit(dual_gaussian, (1000, 0.5, 0.1, 1000, 0.8, 0.05), array([[ 1, 0, 0, 0, 5, 2, 6, 9, 6, 12, 14, 9, 12, 7, 7, 5, 2, 2, 0, 1], [ 1, 0, 0, 0, 5, 2, 6, 9, 6, 12, 14, 9, 12, 7, 7, 5, 2, 2, 0, 1]]), array([-3.12032937, -2.81401307, -2.50769676, -2.20138046, -1.89506415, -1.58874784, -1.28243154, -0.97611523, -0.66979893, -0.36348262, -0.05716631, 0.24914999, 0.5554663 , 0.8617826 , 1.16809891, 1.47441522, 1.78073152, 2.08704783, 2.39336413, 2.69968044]))