-
Notifications
You must be signed in to change notification settings - Fork 12
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
[windows] fastkde==2.1.3 nuifft fails when running with numpy < 2: ValueError: Buffer dtype mismatch, expected 'int64_t' but got 'long' #53
Comments
The failing line Line 119 in fe626ab
is assigning and array of dtype np.int_ (32bit on windows and numpy<2) to array reference of dtype np.int64, so I guess the failure is expected |
thanks @jvesely for raising this issue and identifying the cause! I think the likely fix will be to set A short-term fix might be to install a version of fastkde less than 2.1.1, which is when support for numpy>2 was introduced and the change to line 119 was made to support numpy 2 (previously it was |
thanks for looking at this. there appear to be several instances of this problem in the nufft.pyx file:
we're currently using fastkde==2.0.1 as that is the latest older version available on pypi which works great for us. We ran into this issue when testing our code with numpy 2+, because fastkde==2.0.1 doesn't work with numpy 2+:
This is expected since packages built against numpy 1.x are not expected to work with numpy 2. However, it means that both faskde and numpy versions must be moved together, which makes fixing our code to support numpy 2 a bit cumbersome. |
Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](numpy/numpy@v1.21.0...v2.2.3) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production ... Updates the requirements on [fastkde](https://github.com/LBL-EESA/fastkde) to permit the latest version. - [Release notes](https://github.com/LBL-EESA/fastkde/releases) - [Commits](LBL-EESA/fastkde@v1.0.24...v2.1.3) --- updated-dependencies: - dependency-name: fastkde dependency-type: direct:production ... These dependencies have to be updated in tandem. fastkde-2.0.x doesn't work with Numpy 2 fastkde-2.1.3 doesn't work with Numpy <2 on Windows [0] [0] LBL-EESA/fastkde#53 Signed-off-by: dependabot[bot] <support@github.com>
Probably related to changes to type width in numpy 2 [0,1]
[0] https://numpy.org/doc/2.1/release/2.0.0-notes.html#default-integer-dtype-is-now-64-bit-on-64-bit-windows
[1] https://numpy.org/doc/2.1/numpy_2_0_migration_guide.html#migration-windows-int64
The text was updated successfully, but these errors were encountered: