Skip to content

Commit 3144b99

Browse files
authored
Forward types declarations for external tests (#697)
1 parent de49888 commit 3144b99

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

dpnp/dpnp_iface_types.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,37 @@
4040
"bool",
4141
"bool_",
4242
"complex128",
43+
"complex64",
4344
"dtype",
4445
"float",
46+
"float16",
4547
"float32",
4648
"float64",
4749
"int",
4850
"int32",
4951
"int64",
5052
"integer",
5153
"isscalar",
54+
"longcomplex",
5255
"nan",
53-
"newaxis"
56+
"newaxis",
57+
"void"
5458
]
5559

5660
bool = numpy.bool
5761
bool_ = numpy.bool_
5862
complex128 = numpy.complex128
63+
complex64 = numpy.complex64
5964
dtype = numpy.dtype
60-
float = numpy.float
65+
float16 = numpy.float16
6166
float32 = numpy.float32
6267
float64 = numpy.float64
63-
int = numpy.int
68+
float = numpy.float
6469
int32 = numpy.int32
6570
int64 = numpy.int64
6671
integer = numpy.integer
72+
int = numpy.int
73+
longcomplex = numpy.longcomplex
6774

6875

6976
def isscalar(obj):
@@ -78,3 +85,4 @@ def isscalar(obj):
7885

7986
nan = numpy.nan
8087
newaxis = None
88+
void = numpy.void

tests/third_party/numpy_ext/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
>>> python -m tests.third_party.numpy_ext core/tests/test_umath.py::TestHypot::test_simple
3434
"""
3535

36+
import dpnp
3637
from tests_external.numpy import runtests
3738

3839

tests_external/numpy/runtests.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ def wrapper(*args, **kwargs):
139139
# setting some dummy attrubutes to dpnp
140140
unsupported_classes = [
141141
'byte', 'bytes_', 'cdouble', 'character', 'clongdouble', 'complex_',
142-
'complexfloating', 'datetime64', 'flexible', 'float16', 'floating',
142+
'complexfloating', 'datetime64', 'flexible', 'floating',
143143
'generic', 'half', 'inexact', 'int_', 'int16', 'int8', 'intc', 'integer',
144-
'longcomplex', 'longlong', 'matrix', 'memmap', 'nditer', 'nextafter',
144+
'longlong', 'matrix', 'memmap', 'nditer', 'nextafter',
145145
'number', 'object_', 'short', 'signedinteger', 'single', 'stack',
146146
'timedelta64', 'ubyte', 'uint', 'uint16', 'uint32', 'uint64', 'uint8',
147147
'uintc', 'ulonglong', 'unsignedinteger', 'ushort', 'vectorize',
148-
'VisibleDeprecationWarning', 'void',
148+
'VisibleDeprecationWarning'
149149
]
150150
for klass in unsupported_classes:
151151
setattr(dpnp, klass, DummyClass)
@@ -227,7 +227,6 @@ def wrapper(*args, **kwargs):
227227
# setting some dummy attrubutes to dpnp
228228
dpnp.add.reduce = dummy_func
229229
dpnp.allclose = dummy_func
230-
dpnp.complex64 = DummyClass
231230
dpnp.csingle = dpnp.complex64
232231
dpnp.double = dpnp.float64
233232
dpnp.identity = dummy_func

0 commit comments

Comments
 (0)