Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2137291 - python-nipy fails to build with numpy 1.23
Summary: python-nipy fails to build with numpy 1.23
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nipy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F38FTBFS F39FTBFS PYTHON3.12
TreeView+ depends on / blocked
 
Reported: 2022-10-24 11:10 UTC by Miro Hrončok
Modified: 2023-05-25 13:36 UTC (History)
9 users (show)

Fixed In Version: python-nipy-0.5.0^9512cd9git20230206-7.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-25 13:36:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nipy nipy issues 495 0 None open Multiple test failures with numpy 1.23 2022-10-24 11:25:53 UTC

Description Miro Hrončok 2022-10-24 11:10:44 UTC
Description of problem:
When updating numpy to 1.23.4, I realized python-nipy fails to build with it.

https://copr.fedorainfracloud.org/coprs/churchyard/numpy-1.23/package/python-nipy/

======================================================================
ERROR: nipy.algorithms.statistics.formula.tests.test_formula.test_factor_term
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/formula/tests/test_formula.py", line 513, in test_factor_term
    name = np.asscalar(np.array('foo', ndt))
           ^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/numpy/__init__.py", line 311, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'asscalar'

======================================================================
ERROR: nipy.algorithms.statistics.tests.test_intrinsic_volumes.test_ec
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 190, in test_ec
    _, box1 = randombox((40,) * i)
              ^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 49, in randombox
    return edges, box(shape, edges)
                  ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 34, in box
    data[sl] = 1
    ~~~~^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.statistics.tests.test_intrinsic_volumes.test_ec_disjoint
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 205, in test_ec_disjoint
    box1, box2, _, _ = nonintersecting_boxes((40,)*i)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 89, in nonintersecting_boxes
    edge1, box1 = randombox(shape)
                  ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 49, in randombox
    return edges, box(shape, edges)
                  ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 34, in box
    data[sl] = 1
    ~~~~^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.statistics.tests.test_intrinsic_volumes.test_lips1_disjoint
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 258, in test_lips1_disjoint
    box1, box2, edge1, edge2 = nonintersecting_boxes((30,))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 89, in nonintersecting_boxes
    edge1, box1 = randombox(shape)
                  ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 49, in randombox
    return edges, box(shape, edges)
                  ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 34, in box
    data[sl] = 1
    ~~~~^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.statistics.tests.test_intrinsic_volumes.test_lips2_disjoint
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 283, in test_lips2_disjoint
    box1, box2, edge1, edge2 = nonintersecting_boxes((40,40))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 89, in nonintersecting_boxes
    edge1, box1 = randombox(shape)
                  ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 49, in randombox
    return edges, box(shape, edges)
                  ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 34, in box
    data[sl] = 1
    ~~~~^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.statistics.tests.test_intrinsic_volumes.test_lips3_disjoint
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 310, in test_lips3_disjoint
    box1, box2, edge1, edge2 = nonintersecting_boxes((40,)*3)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 89, in nonintersecting_boxes
    edge1, box1 = randombox(shape)
                  ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 49, in randombox
    return edges, box(shape, edges)
                  ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py", line 34, in box
    data[sl] = 1
    ~~~~^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.utils.tests.test_pca_image.test_other_axes
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/utils/tests/test_pca_image.py", line 298, in test_other_axes
    pos_p = img_res2pos1(p, bv_key)
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/utils/tests/test_pca_image.py", line 277, in img_res2pos1
    res['basis_projections'] = Image(bps * signs[new_axes],
                                           ~~~~~^^^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.tests.test_kernel_smooth.test_anat_smooth
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/tests/test_kernel_smooth.py", line 22, in test_anat_smooth
    smoother = LinearFilter(anat.coordmap, anat.shape)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 49, in __init__
    self._setup_kernel()
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 69, in _setup_kernel
    kernel = _crop(kernel)
             ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 261, in _crop
    return X[slices]
           ~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.tests.test_kernel_smooth.test_funny_coordmap
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/tests/test_kernel_smooth.py", line 41, in test_funny_coordmap
    smoother = LinearFilter(func1.coordmap, func1.shape)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 49, in __init__
    self._setup_kernel()
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 69, in _setup_kernel
    kernel = _crop(kernel)
             ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 261, in _crop
    return X[slices]
           ~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.tests.test_kernel_smooth.test_func_smooth
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/tests/test_kernel_smooth.py", line 60, in test_func_smooth
    smoother = LinearFilter(func.coordmap, func.shape)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 49, in __init__
    self._setup_kernel()
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 69, in _setup_kernel
    kernel = _crop(kernel)
             ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 261, in _crop
    return X[slices]
           ~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.algorithms.tests.test_kernel_smooth.test_kernel
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/tests/test_kernel_smooth.py", line 92, in test_kernel
    kernel = LinearFilter(coordmap, shape,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 49, in __init__
    self._setup_kernel()
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 69, in _setup_kernel
    kernel = _crop(kernel)
             ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/algorithms/kernel_smooth.py", line 261, in _crop
    return X[slices]
           ~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.core.image.tests.test_image.test_iter_axis
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/image/tests/test_image.py", line 293, in test_iter_axis
    assert_array_equal(s, data[slicer])
                          ~~~~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.core.utils.tests.test_generators.test_multi_slice
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/utils/tests/test_generators.py", line 41, in test_multi_slice
    for _, d in slice_generator(DATA, axis=[0, 1]):
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/utils/generators.py", line 193, in slice_generator
    yield slices, data[slices]
                  ~~~~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

======================================================================
ERROR: nipy.core.utils.tests.test_generators.test_multi_slice_write
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/utils/tests/test_generators.py", line 61, in test_multi_slice_write
    write_data(a, slice_generator(DATA, axis=[0, 1]))
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/utils/generators.py", line 141, in write_data
    for index, data in iterable:
  File "/builddir/build/BUILD/nipy-0.5.0/build/lib.linux-x86_64-cpython-311/nipy/core/utils/generators.py", line 193, in slice_generator
    yield slices, data[slices]
                  ~~~~^^^^^^^^
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

----------------------------------------------------------------------
Ran 2586 tests in 121.743s

FAILED (SKIP=12, errors=14)


Version-Release number of selected component: 0.5.0-6


How reproducible:
Fetch numpy from his PR:
https://src.fedoraproject.org/rpms/numpy/pull-request/27
Or use this Copr:
https://copr.fedorainfracloud.org/coprs/churchyard/numpy-1.23/
And build this package.

Actual results: Package fails to build.


Expected results: Package builds successfully.


Let me know if we should delay the update or proceed.

Comment 1 Ankur Sinha (FranciscoD) 2022-10-24 11:25:54 UTC
I've informed upstream about it, so if possible we'd like to wait for them to respond (and maybe even publish fixes): https://github.com/nipy/nipy/issues/495

Comment 2 Miro Hrončok 2022-10-25 11:27:21 UTC
I see no commits upstream since Mar 2021. Happy to wait, but let's agree on a deadline. The numpy update is blocking some Python 3.12 work.

Comment 3 Ankur Sinha (FranciscoD) 2022-10-25 11:41:05 UTC
Whatever works for you folks, really. If upstream doesn't make fixes soon, this will just have to remain FTBFS until they do or one of us finds time to patch it etc. Luckily, it seems to be a leaf package and should not affect others.

Comment 4 Miro Hrončok 2022-11-08 14:46:53 UTC
No upstream response, so I'm proceeding with the numpy update.

Comment 5 Ankur Sinha (FranciscoD) 2022-11-08 15:04:38 UTC
Sounds good 👍

Comment 6 Ben Cotton 2023-02-07 15:11:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.


Note You need to log in before you can comment on or make changes to this bug.