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

non-native endianness ndarrays cause a crash, instead of silent conversion to native endianness #74

Open
brandondube opened this issue Sep 23, 2022 · 0 comments

Comments

@brandondube
Copy link

This is essentially the same issue as cupy/cupy#4288;

A basic example:

from astropy.io import fits
from mkl_fft import _scipy_fft_backend as mklfft

a = fits.getdata(any_fits_file)
mklfft.fft2(a)

Produces the exception:

~/miniconda3/envs/prysm/lib/python3.8/site-packages/mkl_fft/_scipy_fft_backend.py in fft2(a, s, axes, norm, overwrite_x, workers)
    187     x = _float_utils.__upcast_float16_array(a)
    188     with Workers(workers):
--> 189         output = _pydfti.fftn(x, shape=s, axes=axes, overwrite_x=overwrite_x)
    190     if _unitary(norm):
    191         factor = 1

mkl_fft/_pydfti.pyx in mkl_fft._pydfti.fftn()

mkl_fft/_pydfti.pyx in mkl_fft._pydfti._fftnd_impl()

mkl_fft/_pydfti.pyx in mkl_fft._pydfti.iter_complementary()

<__array_function__ internals> in copyto(*args, **kwargs)

TypeError: Cannot cast array data from dtype('complex128') to dtype('>f8') according to the rule 'same_kind'

mkl_fft version 1.3.0

@brandondube brandondube changed the title non-native endianness ndarrays cause a crash non-native endianness ndarrays cause a crash, instead of silent conversion to native endianness Sep 23, 2022
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

No branches or pull requests

1 participant