Skip to content

Commit 7bc05f2

Browse files
committed
updated type names for 2.0
1 parent 6e73e58 commit 7bc05f2

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

performance/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,9 @@ def __init__(self):
507507
self.values = [
508508
np.longlong(-1), np.int_(-1), np.intc(-1), np.short(-1), np.byte(-1),
509509
np.ubyte(1), np.ushort(1), np.uintc(1), np.uint(1), np.ulonglong(1),
510-
np.half(1.0), np.single(1.0), np.float_(1.0), np.longfloat(1.0),
511-
np.csingle(1.0j), np.complex_(1.0j), np.clongfloat(1.0j),
512-
np.bool_(0), np.str_('1'), np.unicode_('1'), np.void(1),
510+
np.half(1.0), np.single(1.0), np.float64(1.0), np.longdouble(1.0),
511+
np.csingle(1.0j), np.complex_(1.0j), np.clongdouble(1.0j),
512+
np.bool_(0), np.str_('1'), np.str_('1'), np.void(1),
513513
np.object(), np.datetime64('NaT'), np.timedelta64('NaT'), np.nan,
514514
12, 12.0, True, None, float('NaN'), object(), (1, 2, 3),
515515
NT(1, 2, 3), datetime.date(2020, 12, 31), datetime.timedelta(14),

src/methods.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ isna_element(PyObject *m, PyObject *args, PyObject *kwargs)
558558
Py_complex val = ((PyComplexObject*)element)->cval;
559559
return PyBool_FromLong(isnan(val.real) || isnan(val.imag));
560560
}
561-
// TODO: fix!
562561
if (PyArray_IsScalar(element, Complex64)) {
563562
npy_cfloat val = PyArrayScalar_VAL(element, Complex64);
564563
return PyBool_FromLong(isnan(npy_creal(val)) || isnan(npy_cimag(val)));

test/test_util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,11 @@ def test_dtype_from_element_core_dtypes(self) -> None:
527527
np.ulonglong,
528528
np.half,
529529
np.single,
530-
np.float_,
531-
np.longfloat,
530+
np.float64,
531+
np.longdouble,
532532
np.csingle,
533-
np.complex_,
534-
np.clongfloat,
533+
np.complex128,
534+
np.clongdouble,
535535
np.bool_,
536536
]
537537
for dtype in dtypes:
@@ -540,12 +540,12 @@ def test_dtype_from_element_core_dtypes(self) -> None:
540540
def test_dtype_from_element_str_and_misc_dtypes(self) -> None:
541541
dtype_obj_pairs = [
542542
(np.dtype('<U1'), np.str_('1')),
543-
(np.dtype('<U1'), np.unicode_('1')),
543+
(np.dtype('<U1'), np.str_('1')),
544544
(np.dtype('V1'), np.void(1)),
545545
(np.dtype('O'), object),
546546
(np.dtype('<M8'), np.datetime64('NaT')),
547547
(np.dtype('<m8'), np.timedelta64('NaT')),
548-
(np.float_, np.nan),
548+
(np.float64, np.nan),
549549
]
550550
for dtype, obj in dtype_obj_pairs:
551551
self.assertEqual(dtype, dtype_from_element(obj))

0 commit comments

Comments
 (0)