Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1134740 > unrolled thread

Bug#1029593: nibabel: (armel autopkgtest) needs update for NumPy 1.24

Started byGraham Inggs <ginggs@debian.org>
First post2023-01-25 08:20 +0100
Last post2023-01-29 12:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1029593: nibabel: (armel autopkgtest) needs update for NumPy 1.24 Graham Inggs <ginggs@debian.org> - 2023-01-25 08:20 +0100
    Bug#1029593: nibabel: (armel autopkgtest) needs update for NumPy 1.24 Andreas Tille <andreas@an3as.eu> - 2023-01-29 12:40 +0100

#1134740 — Bug#1029593: nibabel: (armel autopkgtest) needs update for NumPy 1.24

FromGraham Inggs <ginggs@debian.org>
Date2023-01-25 08:20 +0100
SubjectBug#1029593: nibabel: (armel autopkgtest) needs update for NumPy 1.24
Message-ID<FRIeB-Zvx-9@gated-at.bofh.it>
Source: nibabel
Version: 4.0.2-1
Severity: serious
User: debian-ci@lists.debian.org
Usertags: needs-update

Hi Maintainer

The autopkgtests of nibabel fail with NumPy 1.24 on armel [1].  I've
copied what I hope is the relevant part of the log below.

Regards
Graham


[1] https://ci.debian.net/packages/n/nibabel/testing/armel/


=================================== FAILURES ===================================
___________________________ test_a2f_nan2zero_range ____________________________

    def test_a2f_nan2zero_range():
        # array_to_file should check if nan can be represented as zero
        # This comes about when the writer can't write the value (-intercept /
        # divslope) because it does not fit in the output range.  Input clipping
        # should not affect this
        fobj = BytesIO()
        # No problem for input integer types - they don't have NaNs
        for dt in INT_TYPES:
            arr_no_nan = np.array([-1, 0, 1, 2], dtype=dt)
            # No errors from explicit thresholding (nor for input float types)
            back_arr = write_return(arr_no_nan, fobj, np.int8, mn=1,
nan2zero=True)
            assert_array_equal([1, 1, 1, 2], back_arr)
            back_arr = write_return(arr_no_nan, fobj, np.int8, mx=-1,
nan2zero=True)
            assert_array_equal([-1, -1, -1, -1], back_arr)
            # Pushing zero outside the output data range does not generate error
            back_arr = write_return(arr_no_nan, fobj, np.int8,
intercept=129, nan2zero=True)
            assert_array_equal([-128, -128, -128, -127], back_arr)
            back_arr = write_return(arr_no_nan, fobj, np.int8,
                                    intercept=257.1, divslope=2, nan2zero=True)
            assert_array_equal([-128, -128, -128, -128], back_arr)
        for dt in CFLOAT_TYPES:
            arr = np.array([-1, 0, 1, np.nan], dtype=dt)
            # Error occurs for arrays without nans too
            arr_no_nan = np.array([-1, 0, 1, 2], dtype=dt)
            complex_warn = (np.ComplexWarning,) if np.issubdtype(dt,
np.complexfloating) else ()
            # Casting nan to int will produce a RuntimeWarning in numpy 1.24
            nan_warn = (RuntimeWarning,) if FP_RUNTIME_WARN else ()
            c_and_n_warn = complex_warn + nan_warn
            # No errors from explicit thresholding
            # mn thresholding excluding zero
            with pytest.warns(complex_warn) if complex_warn else
error_warnings():
                assert_array_equal([1, 1, 1, 0],
                                   write_return(arr, fobj, np.int8, mn=1))
            # mx thresholding excluding zero
            with pytest.warns(complex_warn) if complex_warn else
error_warnings():
                assert_array_equal([-1, -1, -1, 0],
                                   write_return(arr, fobj, np.int8, mx=-1))
            # Errors from datatype threshold after scaling
            with pytest.warns(complex_warn) if complex_warn else
error_warnings():
                back_arr = write_return(arr, fobj, np.int8, intercept=128)
            assert_array_equal([-128, -128, -127, -128], back_arr)
            with pytest.raises(ValueError):
                write_return(arr, fobj, np.int8, intercept=129)
            with pytest.raises(ValueError):
                write_return(arr_no_nan, fobj, np.int8, intercept=129)
            # OK with nan2zero false, but we get whatever nan casts to
>           with pytest.warns(c_and_n_warn) if c_and_n_warn else error_warnings():
E           Failed: DID NOT WARN. No warnings of type (<class
'RuntimeWarning'>,) were emitted.
E           The list of emitted warnings is: [].

nibabel/tests/test_volumeutils.py:700: Failed

[toc] | [next] | [standalone]


#1135344

FromAndreas Tille <andreas@an3as.eu>
Date2023-01-29 12:40 +0100
Message-ID<FTecq-1XiV-11@gated-at.bofh.it>
In reply to#1134740
Hi,

the according log[1] says:

=================================== FAILURES ===================================
___________________________ test_a2f_nan2zero_range ____________________________

    def test_a2f_nan2zero_range():
        # array_to_file should check if nan can be represented as zero
        # This comes about when the writer can't write the value (-intercept /
        # divslope) because it does not fit in the output range.  Input clipping
        # should not affect this
        fobj = BytesIO()
        # No problem for input integer types - they don't have NaNs
        for dt in INT_TYPES:
            arr_no_nan = np.array([-1, 0, 1, 2], dtype=dt)
            # No errors from explicit thresholding (nor for input float types)
            back_arr = write_return(arr_no_nan, fobj, np.int8, mn=1, nan2zero=True)
            assert_array_equal([1, 1, 1, 2], back_arr)
            back_arr = write_return(arr_no_nan, fobj, np.int8, mx=-1, nan2zero=True)
            assert_array_equal([-1, -1, -1, -1], back_arr)
            # Pushing zero outside the output data range does not generate error
            back_arr = write_return(arr_no_nan, fobj, np.int8, intercept=129, nan2zero=True)
            assert_array_equal([-128, -128, -128, -127], back_arr)
            back_arr = write_return(arr_no_nan, fobj, np.int8,
                                    intercept=257.1, divslope=2, nan2zero=True)
            assert_array_equal([-128, -128, -128, -128], back_arr)
        for dt in CFLOAT_TYPES:
            arr = np.array([-1, 0, 1, np.nan], dtype=dt)
            # Error occurs for arrays without nans too
            arr_no_nan = np.array([-1, 0, 1, 2], dtype=dt)
            complex_warn = (np.ComplexWarning,) if np.issubdtype(dt, np.complexfloating) else ()
            # Casting nan to int will produce a RuntimeWarning in numpy 1.24
            nan_warn = (RuntimeWarning,) if FP_RUNTIME_WARN else ()
            c_and_n_warn = complex_warn + nan_warn
            # No errors from explicit thresholding
            # mn thresholding excluding zero
            with pytest.warns(complex_warn) if complex_warn else error_warnings():
                assert_array_equal([1, 1, 1, 0],
                                   write_return(arr, fobj, np.int8, mn=1))
            # mx thresholding excluding zero
            with pytest.warns(complex_warn) if complex_warn else error_warnings():
                assert_array_equal([-1, -1, -1, 0],
                                   write_return(arr, fobj, np.int8, mx=-1))
            # Errors from datatype threshold after scaling
            with pytest.warns(complex_warn) if complex_warn else error_warnings():
                back_arr = write_return(arr, fobj, np.int8, intercept=128)
            assert_array_equal([-128, -128, -127, -128], back_arr)
            with pytest.raises(ValueError):
                write_return(arr, fobj, np.int8, intercept=129)
            with pytest.raises(ValueError):
                write_return(arr_no_nan, fobj, np.int8, intercept=129)
            # OK with nan2zero false, but we get whatever nan casts to
>           with pytest.warns(c_and_n_warn) if c_and_n_warn else error_warnings():
E           Failed: DID NOT WARN. No warnings of type (<class 'RuntimeWarning'>,) were emitted.
E           The list of emitted warnings is: [].

nibabel/tests/test_volumeutils.py:700: Failed
=============================== warnings summary ===============================


Any idea what might be wrong here?

Kind regards
    Andreas.

[1] https://ci.debian.net/data/autopkgtest/testing/armel/n/nibabel/30796127/log.gz

Am Sun, Jan 29, 2023 at 08:56:08AM +0200 schrieb Graham Inggs:
> Control: reopen -1
> 
> autopkgtests of nibabel/5.0.0-1 still fail in the same way on armel.
> 
> https://ci.debian.net/packages/n/nibabel/testing/armel/
> 
> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-packaging
> 

-- 
http://fam-tille.de

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web