FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[5.0RC1] exact double comparison in test_spline.py, exposed by Debian/ppc64el · Issue #12403 · astropy/astropy · GitHub

[5.0RC1] exact double comparison in test_spline.py, exposed by Debian/ppc64el #12403

Description

Description

Some tests in astropy/modeling/tests/test_spline.py compare doubles by equal, which not always works. Specifically on the PowerPC 64 Little Endian architecture on Debian, this gives failures

Expected behavior

Tests should pass :-)

Actual behavior

_________________ TestSpline1D.test_interpolate_fitter[2-None] _________________

self = <astropy.modeling.tests.test_spline.TestSpline1D object at 0x7ffeb53a7a90>
w = None, k = 2

    @pytest.mark.parametrize('w', wieght_tests)
    @pytest.mark.parametrize('k', degree_tests)
    def test_interpolate_fitter(self, w, k):
[...]
        assert (fit_spl.t == spline._eval_args[0]).all()
        assert (fit_spl.c == spline._eval_args[1]).all()
        assert (fitter.fit_info['spline']._eval_args[0] == spline._eval_args[0]).all()
        assert (fitter.fit_info['spline']._eval_args[1] == spline._eval_args[1]).all()
    
        assert spline.get_residual() == fitter.fit_info['resid'] == 0
>       assert (fit_spl(self.x) == spline(self.x)).all()
E       assert False
E        +  where False = <built-in method all of numpy.ndarray object at 0x7ffeb52a9030>()
E        +    where <built-in method all of numpy.ndarray object at 0x7ffeb52a9030> = array([ 0.073...  0.05145015]) == array([ 0.073...  0.05145015])
E             Use -v to get the full diff.all

The same happens on test_smoothing_fitter (line 1207) and test_exact_knots_fitter (line 1267), all fails several times for different parameters.

Full build log

Steps to Reproduce

This happens when running on PowerPC 64 bit little endian.

System Details

platform linux -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
Matplotlib: 3.3.4
Freetype: 2.11.0

Running tests with Astropy version 5.0-rc1.
Running tests in .pybuild/cpython3_3.9/build.

Date: 2021-11-04T11:57:20

Platform: Linux-5.10.0-9-powerpc64le-ppc64le-with-glibc2.32

Executable: /usr/bin/python3.9

Full Python Version:
3.9.7 (default, Sep 24 2021, 09:43:00)
[GCC 10.3.0]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions:
Numpy: 1.19.5
Scipy: 1.7.1
Matplotlib: 3.3.4
h5py: 3.3.0
Pandas: not available
PyERFA: 2.0.0
Cython: 0.29.24
Scikit-image: not available
asdf: not available
pyarrow: not available

Using Astropy options: remote_data: none.

ARCH_ON_CI: undefined
IS_CRON: undefined

rootdir: /<>, configfile: setup.cfg
plugins: mpl-0.11, remotedata-0.3.2, openfiles-0.5.0, mock-3.6.1, filter-subpackage-0.1.1, doctestplus-0.11.0, cov-3.0.0, astropy-header-0.1.2, arraydiff-0.3, hypothesis-5.43.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL