[Debian-astro-maintainers] Bug#917466: python-numpy breaks astropy autopkgtest
Paul Gevers
elbrus at debian.org
Thu Dec 27 20:47:01 GMT 2018
Source: python-numpy, astropy
Control: found -1 python-numpy/1:1.16.0~rc1-2
Control: found -1 astropy/3.0.5-1
X-Debbugs-CC: debian-ci at lists.debian.org
User: debian-ci at lists.debian.org
Usertags: breaks needs-update
Dear maintainers,
With a recent upload of python-numpy the autopkgtest of astropy fails in
testing when that autopkgtest is run with the binary packages of
python-numpy from unstable. It passes when run with only packages from
testing. In tabular form:
pass fail
python-numpy from testing 1:1.16.0~rc1-2
astropy from testing 3.0.5-1
all others from testing from testing
I copied some of the output at the bottom of this report.
Currently this regression is contributing to the delay of the migration
of python-numpy to testing [1]. Due to the nature of this issue, I filed
this bug report against both packages. Can you please investigate the
situation and reassign the bug to the right package? If needed, please
change the bug's severity.
More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
Paul
[1] https://qa.debian.org/excuses.php?package=python-numpy
https://ci.debian.net/data/autopkgtest/testing/amd64/a/astropy/1592290/log.gz
==================================== ERRORS
====================================
____________ ERROR at setup of TestJointFitter.test_joint_parameter
____________
self = <class 'astropy.modeling.tests.test_fitters.TestJointFitter'>
def setup_class(self):
"""
Create 2 gaussian models and some data with noise.
Create a fitter for the two models keeping the amplitude
parameter
common for the two models.
"""
self.g1 = models.Gaussian1D(10, mean=14.9, stddev=.3)
self.g2 = models.Gaussian1D(10, mean=13, stddev=.4)
self.jf = JointFitter([self.g1, self.g2],
{self.g1: ['amplitude'],
self.g2: ['amplitude']}, [9.8])
self.x = np.arange(10, 20, .1)
y1 = self.g1(self.x)
y2 = self.g2(self.x)
with NumpyRNGContext(_RANDOM_SEED):
n = np.random.randn(100)
self.ny1 = y1 + 2 * n
self.ny2 = y2 + 2 * n
> self.jf(self.x, self.ny1, self.x, self.ny2)
/usr/lib/python3/dist-packages/astropy/modeling/tests/test_fitters.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
/usr/lib/python3/dist-packages/astropy/modeling/fitting.py:1215: in __call__
self.fitparams, args=args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
func = <bound method JointFitter.objective_function of
<astropy.modeling.fitting.JointFitter object at 0x7fe60e2239e8>>
x0 = array([9.8, array([14.9]), array([0.3]), array([13.]), array([0.4])],
dtype=object)
args = (array([10. , 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8,
10.9, 11. ,
11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 1...595e+00, -1.30030932e+00,
-2.36494839e+00,
-2.25212374e+00, 3.26000074e+00, 1.37397670e+00, 4.73034211e-02]))
Dfun = None, full_output = 0, col_deriv = 0, ftol = 1.49012e-08
xtol = 1.49012e-08, gtol = 0.0, maxfev = 1200, epsfcn =
2.220446049250313e-16
factor = 100, diag = None
def leastsq(func, x0, args=(), Dfun=None, full_output=0,
col_deriv=0, ftol=1.49012e-8, xtol=1.49012e-8,
gtol=0.0, maxfev=0, epsfcn=None, factor=100, diag=None):
"""
Minimize the sum of squares of a set of equations.
::
x = arg min(sum(func(y)**2,axis=0))
y
Parameters
----------
func : callable
should take at least one (possibly length N vector) argument and
returns M floating point numbers. It must not return NaNs or
fitting might fail.
x0 : ndarray
The starting estimate for the minimization.
args : tuple, optional
Any extra arguments to func are placed in this tuple.
Dfun : callable, optional
A function or method to compute the Jacobian of func with
derivatives
across the rows. If this is None, the Jacobian will be
estimated.
full_output : bool, optional
non-zero to return all optional outputs.
col_deriv : bool, optional
non-zero to specify that the Jacobian function computes
derivatives
down the columns (faster, because there is no transpose
operation).
ftol : float, optional
Relative error desired in the sum of squares.
xtol : float, optional
Relative error desired in the approximate solution.
gtol : float, optional
Orthogonality desired between the function vector and the
columns of
the Jacobian.
maxfev : int, optional
The maximum number of calls to the function. If `Dfun` is
provided
then the default `maxfev` is 100*(N+1) where N is the number
of elements
in x0, otherwise the default `maxfev` is 200*(N+1).
epsfcn : float, optional
A variable used in determining a suitable step length for
the forward-
difference approximation of the Jacobian (for Dfun=None).
Normally the actual step length will be sqrt(epsfcn)*x
If epsfcn is less than the machine precision, it is assumed
that the
relative errors are of the order of the machine precision.
factor : float, optional
A parameter determining the initial step bound
(``factor * || diag * x||``). Should be in interval ``(0.1,
100)``.
diag : sequence, optional
N positive entries that serve as a scale factors for the
variables.
Returns
-------
x : ndarray
The solution (or the result of the last iteration for an
unsuccessful
call).
cov_x : ndarray
Uses the fjac and ipvt optional outputs to construct an
estimate of the jacobian around the solution. None if a
singular matrix encountered (indicates very flat curvature in
some direction). This matrix must be multiplied by the
residual variance to get the covariance of the
parameter estimates -- see curve_fit.
infodict : dict
a dictionary of optional outputs with the key s:
``nfev``
The number of function calls
``fvec``
The function evaluated at the output
``fjac``
A permutation of the R matrix of a QR
factorization of the final approximate
Jacobian matrix, stored column wise.
Together with ipvt, the covariance of the
estimate can be approximated.
``ipvt``
An integer array of length N which defines
a permutation matrix, p, such that
fjac*p = q*r, where r is upper triangular
with diagonal elements of nonincreasing
magnitude. Column j of p is column ipvt(j)
of the identity matrix.
``qtf``
The vector (transpose(q) * fvec).
mesg : str
A string message giving information about the cause of failure.
ier : int
An integer flag. If it is equal to 1, 2, 3 or 4, the
solution was
found. Otherwise, the solution was not found. In either
case, the
optional output variable 'mesg' gives more information.
Notes
-----
"leastsq" is a wrapper around MINPACK's lmdif and lmder algorithms.
cov_x is a Jacobian approximation to the Hessian of the least
squares
objective function.
This approximation assumes that the objective function is based
on the
difference between some observed target data (ydata) and a
(non-linear)
function of the parameters `f(xdata, params)` ::
func(params) = ydata - f(xdata, params)
so that the objective function is ::
min sum((ydata - f(xdata, params))**2, axis=0)
params
The solution, `x`, is always a 1D array, regardless of the shape
of `x0`,
or whether `x0` is a scalar.
"""
x0 = asarray(x0).flatten()
n = len(x0)
if not isinstance(args, tuple):
args = (args,)
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)
m = shape[0]
if n > m:
raise TypeError('Improper input: N=%s must not exceed M=%s'
% (n, m))
if epsfcn is None:
epsfcn = finfo(dtype).eps
if Dfun is None:
if maxfev == 0:
maxfev = 200*(n + 1)
with _MINPACK_LOCK:
retval = _minpack._lmdif(func, x0, args, full_output,
ftol, xtol,
> gtol, maxfev, epsfcn, factor, diag)
E TypeError: Cannot cast array data from dtype('O') to
dtype('float64') according to the rule 'safe'
/usr/lib/python3/dist-packages/scipy/optimize/minpack.py:394: TypeError
_____________ ERROR at setup of TestJointFitter.test_joint_fitter
______________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-astro-maintainers/attachments/20181227/6e5bc969/attachment-0001.sig>
More information about the Debian-astro-maintainers
mailing list