-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support for Numpy >= 2.0 #652
Comments
Hey @morales-gregorio , Thank you for your inquiry. Indeed, we are actively working on compatibility with Numpy 2.0. However, there are dependencies that currently prevent us from fully supporting it. Specifically, we had to wait for key fixes in python-quantities (support of numpy 2.0 with release 0.16.0 since Aug 27, 2024): At present, we are still waiting for Neo to gain full compatibility with Numpy 2.0, which is being tracked in: If you are currently using Numpy 2.0, please note that this is not officially supported yet. You may encounter unexpected behavior, as Elephant has not been tested with Numpy 2.0 so far. Thank you for your understanding and patience. |
Hey both we just merged Neo 1490 so we would love to know if anything is coming up on the downstream side. Just let us know :) |
With =========================== short test summary info ============================
FAILED elephant/test/test_icsd.py::TestICSD::test_DeltaiCSD_00 - AssertionErr...
FAILED elephant/test/test_icsd.py::TestICSD::test_DeltaiCSD_01 - AssertionErr...
FAILED elephant/test/test_icsd.py::TestICSD::test_DeltaiCSD_02 - AssertionErr...
FAILED elephant/test/test_icsd.py::TestICSD::test_DeltaiCSD_03 - AssertionErr...
FAILED elephant/test/test_icsd.py::TestICSD::test_DeltaiCSD_04 - AssertionErr...
FAILED elephant/test/test_phase_analysis.py::SpikeTriggeredPhaseTestCase::test_perfect_locking_many_spiketrains_many_signals
FAILED elephant/test/test_phase_analysis.py::SpikeTriggeredPhaseTestCase::test_perfect_locking_many_spiketrains_one_signal
FAILED elephant/test/test_phase_analysis.py::SpikeTriggeredPhaseTestCase::test_perfect_locking_one_spiketrain_one_signal
FAILED elephant/test/test_phase_analysis.py::SpikeTriggeredPhaseTestCase::test_perfect_locking_one_spiketrains_many_signals
FAILED elephant/test/test_spectral.py::MultitaperCrossSpectrumTestCase::test_multitaper_cross_spectrum_behavior
FAILED elephant/test/test_spectral.py::MultitaperCoherenceTestCase::test_multitaper_coherence_input_types
= 11 failed, 691 passed, 3 skipped, 21 deselected, 3648 warnings in 951.42s (0:15:51) = Full log```python =================================== FAILURES =================================== __________________________ TestICSD.test_DeltaiCSD_00 __________________________self = <elephant.test.test_icsd.TestICSD testMethod=test_DeltaiCSD_00>
E AssertionError: array(1.) * A/m2 != array(1.) * kg*m/(s3*A) elephant/test/test_icsd.py:453: AssertionError self = <elephant.test.test_icsd.TestICSD testMethod=test_DeltaiCSD_01>
E AssertionError: array(1.) * A/m2 != array(1.) * kg*m/(s3*A) elephant/test/test_icsd.py:497: AssertionError self = <elephant.test.test_icsd.TestICSD testMethod=test_DeltaiCSD_02>
E AssertionError: array(1.) * A/m2 != array(1.) * kg*m/(s3*A) elephant/test/test_icsd.py:541: AssertionError self = <elephant.test.test_icsd.TestICSD testMethod=test_DeltaiCSD_03>
E AssertionError: array(1.) * A/m2 != array(1.) * kg*m/(s3*A) elephant/test/test_icsd.py:586: AssertionError self = <elephant.test.test_icsd.TestICSD testMethod=test_DeltaiCSD_04>
E AssertionError: array(1.) * A/m2 != array(1.) * kg*m/(s3*A) elephant/test/test_icsd.py:631: AssertionError self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E KeyError: <ufunc 'bitwise_and'> /usr/lib/python3.13/site-packages/quantities/quantity.py:284: KeyError During handling of the above exception, another exception occurred: x = array([0.95134403, 0.97496865, 0.98322633, ..., 0.98740633, 0.98322633,
/usr/lib64/python3.13/site-packages/numpy/testing/_private/utils.py:1673: /usr/lib64/python3.13/site-packages/numpy/_core/numeric.py:2447: in isclose self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E ValueError: ufunc <ufunc 'bitwise_and'> not supported by quantities /usr/lib/python3.13/site-packages/quantities/quantity.py:286: ValueError During handling of the above exception, another exception occurred: self = <elephant.test.test_phase_analysis.SpikeTriggeredPhaseTestCase testMethod=test_perfect_locking_many_spiketrains_many_signals>
E ValueError: elephant/test/test_phase_analysis.py:63: ValueError self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E KeyError: <ufunc 'bitwise_and'> /usr/lib/python3.13/site-packages/quantities/quantity.py:284: KeyError During handling of the above exception, another exception occurred: x = array([0.95134403, 0.97496865, 0.98322633, ..., 0.98740633, 0.98322633,
/usr/lib64/python3.13/site-packages/numpy/testing/_private/utils.py:1673: /usr/lib64/python3.13/site-packages/numpy/_core/numeric.py:2447: in isclose self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E ValueError: ufunc <ufunc 'bitwise_and'> not supported by quantities /usr/lib/python3.13/site-packages/quantities/quantity.py:286: ValueError During handling of the above exception, another exception occurred: self = <elephant.test.test_phase_analysis.SpikeTriggeredPhaseTestCase testMethod=test_perfect_locking_many_spiketrains_one_signal>
E ValueError: elephant/test/test_phase_analysis.py:91: ValueError self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E KeyError: <ufunc 'bitwise_and'> /usr/lib/python3.13/site-packages/quantities/quantity.py:284: KeyError During handling of the above exception, another exception occurred: x = array([0.95134403, 0.97496865, 0.98322633, ..., 0.98740633, 0.98322633,
/usr/lib64/python3.13/site-packages/numpy/testing/_private/utils.py:1673: /usr/lib64/python3.13/site-packages/numpy/_core/numeric.py:2447: in isclose self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E ValueError: ufunc <ufunc 'bitwise_and'> not supported by quantities /usr/lib/python3.13/site-packages/quantities/quantity.py:286: ValueError During handling of the above exception, another exception occurred: self = <elephant.test.test_phase_analysis.SpikeTriggeredPhaseTestCase testMethod=test_perfect_locking_one_spiketrain_one_signal>
E ValueError: elephant/test/test_phase_analysis.py:48: ValueError self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E KeyError: <ufunc 'bitwise_and'> /usr/lib/python3.13/site-packages/quantities/quantity.py:284: KeyError During handling of the above exception, another exception occurred: x = array([0.95134403, 0.97496865, 0.98322633, ..., 0.98740633, 0.98322633,
/usr/lib64/python3.13/site-packages/numpy/testing/_private/utils.py:1673: /usr/lib64/python3.13/site-packages/numpy/_core/numeric.py:2447: in isclose self = array([ True, True, True, ..., True, True, True], shape=(1998,)) * dimensionless
E ValueError: ufunc <ufunc 'bitwise_and'> not supported by quantities /usr/lib/python3.13/site-packages/quantities/quantity.py:286: ValueError During handling of the above exception, another exception occurred: self = <elephant.test.test_phase_analysis.SpikeTriggeredPhaseTestCase testMethod=test_perfect_locking_one_spiketrains_many_signals>
E ValueError: elephant/test/test_phase_analysis.py:78: ValueError self = <elephant.test.test_spectral.MultitaperCrossSpectrumTestCase testMethod=test_multitaper_cross_spectrum_behavior>
E AssertionError: np.False_ is not true elephant/test/test_spectral.py:572: AssertionError self = array([ True, True, True, ..., True, True, True], shape=(5001,)) * dimensionless
E KeyError: <ufunc 'bitwise_and'> /usr/lib/python3.13/site-packages/quantities/quantity.py:284: KeyError During handling of the above exception, another exception occurred: x = array([0.00078479, 0.12790765, 0.12810887, ..., 0.19397819, 0.189415 ,
/usr/lib64/python3.13/site-packages/numpy/testing/_private/utils.py:1673: /usr/lib64/python3.13/site-packages/numpy/_core/numeric.py:2447: in isclose self = array([ True, True, True, ..., True, True, True], shape=(5001,)) * dimensionless
E ValueError: ufunc <ufunc 'bitwise_and'> not supported by quantities /usr/lib/python3.13/site-packages/quantities/quantity.py:286: ValueError During handling of the above exception, another exception occurred: self = <elephant.test.test_spectral.MultitaperCoherenceTestCase testMethod=test_multitaper_coherence_input_types>
E ValueError: elephant/test/test_spectral.py:932: ValueError
|
Hi,
are there any plans to test and deploy support for NumPy >= 2.0 ? I have been using elephant with numpy 2.2 for some time now and there is a massive performance improvement. From the migration guide it seems not many errors will be raised by the change, in fact I did not encounter any errors so far.
Best,
Aitor
The text was updated successfully, but these errors were encountered: