Bug 2333879 - contextualbandits needs to be rebuilt against NumPy 2.x
Summary: contextualbandits needs to be rebuilt against NumPy 2.x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-contextualbandits
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Iztok Fister, Jr.
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: NUMPY2
TreeView+ depends on / blocked
 
Reported: 2024-12-23 19:55 UTC by Sandro
Modified: 2024-12-24 20:43 UTC (History)
1 user (show)

Fixed In Version: python-contextualbandits-0.3.21-10.fc42
Clone Of:
Environment:
Last Closed: 2024-12-24 20:43:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sandro 2024-12-23 19:55:34 UTC
Currently, importing contextualbandits results in:

>>> import contextualbandits

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib64/python3.13/_pyrepl/__main__.py", line 6, in <module>
    __pyrepl_interactive_console()
  File "/usr/lib64/python3.13/_pyrepl/main.py", line 59, in interactive_console
    run_multiline_interactive_console(console)
  File "/usr/lib64/python3.13/_pyrepl/simple_interact.py", line 160, in run_multiline_interactive_console
    more = console.push(_strip_final_indent(statement), filename=input_name, _symbol="single")  # type: ignore[call-arg]
  File "/usr/lib64/python3.13/code.py", line 314, in push
    more = self.runsource(source, filename, symbol=_symbol)
  File "/usr/lib64/python3.13/_pyrepl/console.py", line 211, in runsource
    self.runcode(code)
  File "/usr/lib64/python3.13/code.py", line 92, in runcode
    exec(code, self.locals)
  File "<python-input-0>", line 1, in <module>
    import contextualbandits
  File "/usr/lib64/python3.13/site-packages/contextualbandits/__init__.py", line 1, in <module>
    from . import online
  File "/usr/lib64/python3.13/site-packages/contextualbandits/online.py", line 4, in <module>
    from .utils import _check_constructor_input, _check_beta_prior, \
  File "/usr/lib64/python3.13/site-packages/contextualbandits/utils.py", line 10, in <module>
    from .linreg import LinearRegression, _wrapper_double
  File "/usr/lib64/python3.13/site-packages/contextualbandits/linreg/__init__.py", line 6, in <module>
    from . import _wrapper_double, _wrapper_float
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import contextualbandits
  File "/usr/lib64/python3.13/site-packages/contextualbandits/__init__.py", line 1, in <module>
    from . import online
  File "/usr/lib64/python3.13/site-packages/contextualbandits/online.py", line 4, in <module>
    from .utils import _check_constructor_input, _check_beta_prior, \
    ...<10 lines>...
                _TreeUCB_n_TS_single
  File "/usr/lib64/python3.13/site-packages/contextualbandits/utils.py", line 10, in <module>
    from .linreg import LinearRegression, _wrapper_double
  File "/usr/lib64/python3.13/site-packages/contextualbandits/linreg/__init__.py", line 6, in <module>
    from . import _wrapper_double, _wrapper_float
  File "contextualbandits/linreg/linreg_double.pyx", line 1, in init contextualbandits.linreg._wrapper_double
ImportError: numpy.core.multiarray failed to import (auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; use '<void>numpy._import_array' to disable if you are certain you don't need it).

A simple bump and rebuild should fix that.

Reproducible: Always

Comment 1 Fedora Update System 2024-12-24 20:41:19 UTC
FEDORA-2024-148dbb8863 (python-contextualbandits-0.3.21-10.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-148dbb8863

Comment 2 Fedora Update System 2024-12-24 20:43:59 UTC
FEDORA-2024-148dbb8863 (python-contextualbandits-0.3.21-10.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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