Skip to content
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

ENH: Relax required trimeshpy dependency version #87

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jhlegarreta
Copy link
Owner

@jhlegarreta jhlegarreta commented Nov 13, 2024

Relax required trimeshpy dependency version so that more recent versions are allowed: do not pin to version 0.0.2 and allow versions equal to or greater than 0.0.2.

The changes in the trimeshpy classes used in tractodata between versions 0.0.2 and 0.0.3 (latest release) are safe and do not affect the behavior: they only drop checks for VTK <= 5 and 8, adopt keyword arguments in some calls, use Python built-in types (e.g. int instead of np.int), use NiBabel's affine property on NIfTI images, and drop import from future.

Restrict NumPy to versions lower than 2.0.0 to avoid:

E   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 module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 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.

@jhlegarreta jhlegarreta force-pushed the RelaxTrimeshpyVersion branch from fef62dd to ba6f014 Compare November 13, 2024 16:49
Relax required `trimeshpy` dependency version so that more recent
versions are allowed: do not pin to version `0.0.2` and allow versions
equal to or greater than `0.0.2`.

The changes in the `trimeshpy` classes used in `tractodata` between
versions `0.0.2` and `0.0.3` (latest release) are safe and do not affect
the behavior: they only drop checks for `VTK` <= 5 and 8, adopt keyword
arguments in some calls, use Python built-in types (e.g. `int` instead
of `np.int`), use `NiBabel`'s `affine` property on NIfTI images, and
drop import from `future`.

Restrict `NumPy` to versions lower than `2.0.0` to avoid:
```
E   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 module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.3 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.

```
@jhlegarreta jhlegarreta force-pushed the RelaxTrimeshpyVersion branch from ba6f014 to 4ce4ba5 Compare November 13, 2024 16:50
@jhlegarreta jhlegarreta merged commit 1107a74 into main Nov 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant