Skip to content

Commit

Permalink
Merge pull request #102 from IntelPython/fix-failures-on-win-with-num…
Browse files Browse the repository at this point in the history
…py-2.0

np.longcomplex and np.complex_ are replaced
  • Loading branch information
oleksandr-pavlyk authored May 30, 2024
2 parents d105f86 + 9261c08 commit 04435a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mkl_fft/_float_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def __downcast_float128_array(x):
xdt = x.dtype
if xdt == np.longdouble and not xdt == np.float64:
return np.asarray(x, dtype=np.float64)
elif xdt == np.clongdouble and not xdt == np.complex_:
return np.asarray(x, dtype=np.complex_)
elif xdt == np.clongdouble and not xdt == np.complex128:
return np.asarray(x, dtype=np.complex128)
if not isinstance(x, np.ndarray):
__x = np.asarray(x)
xdt = __x.dtype
if xdt == np.longdouble and not xdt == np.float64:
return np.asarray(x, dtype=np.float64)
elif xdt == np.longcomplex and not xdt == np.complex_:
return np.asarray(x, dtype=np.complex_)
elif xdt == np.clongdouble and not xdt == np.complex128:
return np.asarray(x, dtype=np.complex128)
return __x
return x

Expand Down

0 comments on commit 04435a9

Please sign in to comment.