Skip to content

Commit 321a466

Browse files
authored
Add more float aliases (#842)
1 parent 970e34a commit 321a466

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ Internal functions
205205
"""
206206
cdef DPNPFuncType dpnp_dtype_to_DPNPFuncType(dtype):
207207

208-
if dtype in [numpy.float64, 'float64']:
208+
if dtype in [numpy.float64, numpy.float, 'float64', 'float', 'f8']:
209209
return DPNP_FT_DOUBLE
210210
elif dtype in [numpy.float32, 'float32', 'f4']:
211211
return DPNP_FT_FLOAT
212-
elif dtype in [numpy.int64, 'int64', 'int', int]:
212+
elif dtype in [numpy.int64, numpy.int, 'int64', 'int', int]:
213213
return DPNP_FT_LONG
214214
elif dtype in [numpy.int32, 'int32']:
215215
return DPNP_FT_INT

dpnp/dpnp_iface_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"bool_",
4242
"complex128",
4343
"complex64",
44+
"default_float_type",
4445
"dtype",
4546
"float",
4647
"float16",
@@ -73,6 +74,8 @@
7374
int = numpy.int
7475
longcomplex = numpy.longcomplex
7576

77+
def default_float_type():
78+
return float64
7679

7780
def isscalar(obj):
7881
"""

0 commit comments

Comments
 (0)