We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e73e58 commit 7bc05f2Copy full SHA for 7bc05f2
performance/__main__.py
@@ -507,9 +507,9 @@ def __init__(self):
507
self.values = [
508
np.longlong(-1), np.int_(-1), np.intc(-1), np.short(-1), np.byte(-1),
509
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),
+ np.half(1.0), np.single(1.0), np.float64(1.0), np.longdouble(1.0),
+ np.csingle(1.0j), np.complex_(1.0j), np.clongdouble(1.0j),
+ np.bool_(0), np.str_('1'), np.str_('1'), np.void(1),
513
np.object(), np.datetime64('NaT'), np.timedelta64('NaT'), np.nan,
514
12, 12.0, True, None, float('NaN'), object(), (1, 2, 3),
515
NT(1, 2, 3), datetime.date(2020, 12, 31), datetime.timedelta(14),
src/methods.c
@@ -558,7 +558,6 @@ isna_element(PyObject *m, PyObject *args, PyObject *kwargs)
558
Py_complex val = ((PyComplexObject*)element)->cval;
559
return PyBool_FromLong(isnan(val.real) || isnan(val.imag));
560
}
561
- // TODO: fix!
562
if (PyArray_IsScalar(element, Complex64)) {
563
npy_cfloat val = PyArrayScalar_VAL(element, Complex64);
564
return PyBool_FromLong(isnan(npy_creal(val)) || isnan(npy_cimag(val)));
test/test_util.py
@@ -527,11 +527,11 @@ def test_dtype_from_element_core_dtypes(self) -> None:
527
np.ulonglong,
528
np.half,
529
np.single,
530
- np.float_,
531
- np.longfloat,
+ np.float64,
+ np.longdouble,
532
np.csingle,
533
- np.complex_,
534
- np.clongfloat,
+ np.complex128,
+ np.clongdouble,
535
np.bool_,
536
]
537
for dtype in dtypes:
@@ -540,12 +540,12 @@ def test_dtype_from_element_core_dtypes(self) -> None:
540
def test_dtype_from_element_str_and_misc_dtypes(self) -> None:
541
dtype_obj_pairs = [
542
(np.dtype('<U1'), np.str_('1')),
543
- (np.dtype('<U1'), np.unicode_('1')),
+ (np.dtype('<U1'), np.str_('1')),
544
(np.dtype('V1'), np.void(1)),
545
(np.dtype('O'), object),
546
(np.dtype('<M8'), np.datetime64('NaT')),
547
(np.dtype('<m8'), np.timedelta64('NaT')),
548
- (np.float_, np.nan),
+ (np.float64, np.nan),
549
550
for dtype, obj in dtype_obj_pairs:
551
self.assertEqual(dtype, dtype_from_element(obj))
0 commit comments