When running the test suite against NumPy 2.0.0rc2, I'm getting the following test failures:
$ python -m unittest
.........................E...................E........................E.............EEE..................E...........EEE..............................................E...................E........................E.............EEE..................E...........EEE.................................................E...........E...........................EEE...............E...............E...........E................................EEE..................E..........................E...................E...................E....E.............EEE..................E...........EEE.................................E....................E...................E....E.............EEE..................E...........EEE.......................................................................................F......................
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_permissive_read_with_wrong_machine_stamp (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_permissive_read_with_wrong_machine_stamp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 710, in test_permissive_read_with_wrong_machine_stamp
wrong_byte_order = mrc.header.mode.newbyteorder().dtype.byteorder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_writing_image_mode_4_big_endian (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_writing_image_mode_4_big_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 568, in test_writing_image_mode_4_big_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_little_endian (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_writing_image_mode_4_little_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 560, in test_writing_image_mode_4_little_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_native_byte_order (tests.test_bzip2mrcfile.Bzip2MrcFileTest.test_writing_image_mode_4_native_byte_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 552, in test_writing_image_mode_4_native_byte_order
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_gzipmrcfile.GzipMrcFileTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_gzipmrcfile.GzipMrcFileTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_permissive_read_with_wrong_machine_stamp (tests.test_gzipmrcfile.GzipMrcFileTest.test_permissive_read_with_wrong_machine_stamp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 710, in test_permissive_read_with_wrong_machine_stamp
wrong_byte_order = mrc.header.mode.newbyteorder().dtype.byteorder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_gzipmrcfile.GzipMrcFileTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_gzipmrcfile.GzipMrcFileTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_gzipmrcfile.GzipMrcFileTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_gzipmrcfile.GzipMrcFileTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_writing_image_mode_4_big_endian (tests.test_gzipmrcfile.GzipMrcFileTest.test_writing_image_mode_4_big_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 568, in test_writing_image_mode_4_big_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_little_endian (tests.test_gzipmrcfile.GzipMrcFileTest.test_writing_image_mode_4_little_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 560, in test_writing_image_mode_4_little_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_native_byte_order (tests.test_gzipmrcfile.GzipMrcFileTest.test_writing_image_mode_4_native_byte_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 552, in test_writing_image_mode_4_native_byte_order
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_mrcobject.MrcObjectTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_mrcobject.MrcObjectTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_mrcobject.MrcObjectTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_mrcobject.MrcObjectTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_mrcobject.MrcObjectTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_mrcobject.MrcObjectTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_mrcinterpreter.MrcInterpreterTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_mrcinterpreter.MrcInterpreterTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_mrcinterpreter.MrcInterpreterTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_mrcinterpreter.MrcInterpreterTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_mrcinterpreter.MrcInterpreterTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_mrcinterpreter.MrcInterpreterTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_mrcfile.MrcFileTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_mrcfile.MrcFileTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_non_mrc_file_gives_correct_warnings_in_permissive_mode (tests.test_mrcfile.MrcFileTest.test_non_mrc_file_gives_correct_warnings_in_permissive_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 228, in _read_header
utils.dtype_from_mode(header.mode)
File "/tmp/mrcfile/mrcfile/utils.py", line 176, in dtype_from_mode
raise ValueError("Unrecognised mode '{0}'".format(mode))
ValueError: Unrecognised mode '1380206665'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 116, in test_non_mrc_file_gives_correct_warnings_in_permissive_mode
with self.newmrc(name, permissive=True) as mrc:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/mrcfile/mrcfile.py", line 115, in __init__
self._read(header_only)
File "/tmp/mrcfile/mrcfile/mrcfile.py", line 131, in _read
super(MrcFile, self)._read(header_only)
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 170, in _read
self._read_header()
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 231, in _read_header
utils.dtype_from_mode(header.mode.newbyteorder())
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_permissive_read_with_wrong_machine_stamp (tests.test_mrcfile.MrcFileTest.test_permissive_read_with_wrong_machine_stamp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 710, in test_permissive_read_with_wrong_machine_stamp
wrong_byte_order = mrc.header.mode.newbyteorder().dtype.byteorder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_mrcfile.MrcFileTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_mrcfile.MrcFileTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_mrcfile.MrcFileTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_mrcfile.MrcFileTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_writing_image_mode_4_big_endian (tests.test_mrcfile.MrcFileTest.test_writing_image_mode_4_big_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 568, in test_writing_image_mode_4_big_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_little_endian (tests.test_mrcfile.MrcFileTest.test_writing_image_mode_4_little_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 560, in test_writing_image_mode_4_little_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_native_byte_order (tests.test_mrcfile.MrcFileTest.test_writing_image_mode_4_native_byte_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 552, in test_writing_image_mode_4_native_byte_order
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_complex64_dtype_is_preserved_in_mode_4 (tests.test_mrcmemmap.MrcMemmapTest.test_complex64_dtype_is_preserved_in_mode_4)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 316, in test_complex64_dtype_is_preserved_in_mode_4
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_header_byte_order_is_changed_by_data_with_opposite_order (tests.test_mrcmemmap.MrcMemmapTest.test_header_byte_order_is_changed_by_data_with_opposite_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 374, in test_header_byte_order_is_changed_by_data_with_opposite_order
self.mrcobject.set_data(data.newbyteorder())
^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_non_mrc_file_gives_correct_warnings_in_permissive_mode (tests.test_mrcmemmap.MrcMemmapTest.test_non_mrc_file_gives_correct_warnings_in_permissive_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 228, in _read_header
utils.dtype_from_mode(header.mode)
File "/tmp/mrcfile/mrcfile/utils.py", line 176, in dtype_from_mode
raise ValueError("Unrecognised mode '{0}'".format(mode))
ValueError: Unrecognised mode '1380206665'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 116, in test_non_mrc_file_gives_correct_warnings_in_permissive_mode
with self.newmrc(name, permissive=True) as mrc:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/mrcfile/mrcfile.py", line 115, in __init__
self._read(header_only)
File "/tmp/mrcfile/mrcfile/mrcfile.py", line 131, in _read
super(MrcFile, self)._read(header_only)
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 170, in _read
self._read_header()
File "/tmp/mrcfile/mrcfile/mrcinterpreter.py", line 231, in _read_header
utils.dtype_from_mode(header.mode.newbyteorder())
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_permissive_read_with_wrong_machine_stamp (tests.test_mrcmemmap.MrcMemmapTest.test_permissive_read_with_wrong_machine_stamp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 710, in test_permissive_read_with_wrong_machine_stamp
wrong_byte_order = mrc.header.mode.newbyteorder().dtype.byteorder
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_setting_origin_as_separate_fields (tests.test_mrcmemmap.MrcMemmapTest.test_setting_origin_as_separate_fields)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 724, in test_setting_origin_as_separate_fields
expected = np.core.records.fromrecords((1., -5., 128.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_field (tests.test_mrcmemmap.MrcMemmapTest.test_setting_origin_as_single_field)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 729, in test_setting_origin_as_single_field
origin = np.core.records.fromrecords((-1., 1., 0.),
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_setting_origin_as_single_tuple (tests.test_mrcmemmap.MrcMemmapTest.test_setting_origin_as_single_tuple)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 737, in test_setting_origin_as_single_tuple
expected = np.core.records.fromrecords(origin,
^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/__init__.py", line 31, in __getattr__
_raise_warning(attr_name)
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/core/_utils.py", line 10, in _raise_warning
warnings.warn(
DeprecationWarning: numpy.core is deprecated and has been renamed to numpy._core. The numpy._core namespace contains private NumPy internals and its use is discouraged, as NumPy internals can change without warning in any release. In practice, most real-world usage of numpy.core is to access functionality in the public NumPy API. If that is the case, use the public NumPy API. If not, you are using NumPy internals. If you would still like to access an internal attribute, use numpy._core.records.
======================================================================
ERROR: test_warning_for_stats_with_inf (tests.test_mrcmemmap.MrcMemmapTest.test_warning_for_stats_with_inf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcobject.py", line 515, in test_warning_for_stats_with_inf
assert header.dmin == np.NINF
^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
======================================================================
ERROR: test_writing_image_mode_4_big_endian (tests.test_mrcmemmap.MrcMemmapTest.test_writing_image_mode_4_big_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 568, in test_writing_image_mode_4_big_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_little_endian (tests.test_mrcmemmap.MrcMemmapTest.test_writing_image_mode_4_little_endian)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 560, in test_writing_image_mode_4_little_endian
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
ERROR: test_writing_image_mode_4_native_byte_order (tests.test_mrcmemmap.MrcMemmapTest.test_writing_image_mode_4_native_byte_order)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_mrcfile.py", line 552, in test_writing_image_mode_4_native_byte_order
warnings.simplefilter("ignore", np.ComplexWarning)
^^^^^^^^^^^^^^^^^
File "/tmp/mrcfile/.tox/py312-numpy1.26/lib/python3.12/site-packages/numpy/__init__.py", line 410, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'ComplexWarning'
======================================================================
FAIL: test_invalid_mode (tests.test_validation.ValidationTest.test_invalid_mode)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/mrcfile/tests/test_validation.py", line 182, in test_invalid_mode
self.check_temp_mrc_invalid_with_warning("mode")
File "/tmp/mrcfile/tests/test_validation.py", line 142, in check_temp_mrc_invalid_with_warning
assert len(w) == 1
^^^^^^^^^^^
AssertionError
----------------------------------------------------------------------
Ran 811 tests in 8.425s
FAILED (failures=1, errors=54)