diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-12-31 19:01:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-31 19:01:54 +0000 |
commit | c99616ac78fba3eae59647d2ead79d20cedb7603 (patch) | |
tree | eb8d80a0ea7d0cd189d5f3151e2c712504fe9e10 | |
parent | 3b1597ce99b9534bccc644c3bdf4fa2b54267e92 (diff) | |
download | cython-c99616ac78fba3eae59647d2ead79d20cedb7603.tar.gz |
numpy.int -> numpy.int_ (#5190)
* numpy.int -> numpy.int_
numpy.int was deprecated and has now been removed
* More fixes
-rw-r--r-- | tests/run/numpy_parallel.pyx | 2 | ||||
-rw-r--r-- | tests/run/numpy_test.pyx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/run/numpy_parallel.pyx b/tests/run/numpy_parallel.pyx index 7dcf2b27a..0d7440f59 100644 --- a/tests/run/numpy_parallel.pyx +++ b/tests/run/numpy_parallel.pyx @@ -32,7 +32,7 @@ def test_parallel_numpy_arrays(): print i return - x = numpy.zeros(10, dtype=numpy.int) + x = numpy.zeros(10, dtype=numpy.int_) for i in prange(x.shape[0], nogil=True): x[i] = i - 5 diff --git a/tests/run/numpy_test.pyx b/tests/run/numpy_test.pyx index 662dd4ad0..59fa71c9b 100644 --- a/tests/run/numpy_test.pyx +++ b/tests/run/numpy_test.pyx @@ -158,9 +158,9 @@ try: >>> test_dtype('D', inc1_cdouble_struct) >>> test_dtype('G', inc1_clongdouble_struct) - >>> test_dtype(np.int, inc1_int_t) + >>> test_dtype(np.int_, inc1_int_t) >>> test_dtype(np.longlong, inc1_longlong_t) - >>> test_dtype(np.float, inc1_float_t) + >>> test_dtype(np.float_, inc1_float_t) >>> test_dtype(np.double, inc1_double_t) >>> test_dtype(np.intp, inc1_intp_t) >>> test_dtype(np.uintp, inc1_uintp_t) @@ -657,7 +657,7 @@ def test_fused_ndarray_other_dtypes(np.ndarray[fused_dtype, ndim=1] a): ndarray[float complex,ndim=1] ndarray[float complex,ndim=1] (5+0j) (6+0j) >>> test_fused_ndarray_other_dtypes(np.arange(10, dtype=np.complex128)) ndarray[double complex,ndim=1] ndarray[double complex,ndim=1] (5+0j) (6+0j) - >>> test_fused_ndarray_other_dtypes(np.arange(10, dtype=np.object)) + >>> test_fused_ndarray_other_dtypes(np.arange(10, dtype=np.object_)) ndarray[Python object,ndim=1] ndarray[Python object,ndim=1] 5 6 """ cdef np.ndarray[fused_dtype, ndim=1] b = a @@ -802,7 +802,7 @@ cdef fused confusing_fused_typedef: def test_dispatch_external_typedef(np.ndarray[confusing_fused_typedef] a): """ - >>> test_dispatch_external_typedef(np.arange(-5, 5, dtype=np.long)) + >>> test_dispatch_external_typedef(np.arange(-5, 5, dtype=np.int_)) -2 """ print a[3] @@ -831,7 +831,7 @@ def test_fused_memslice_other_dtypes(memslice_fused_dtype[:] a): float[:] float[:] 5.0 6.0 >>> test_fused_memslice_other_dtypes(np.arange(10, dtype=np.dtype('i'))) int[:] int[:] 5 6 - >>> test_fused_memslice_other_dtypes(np.arange(10, dtype=np.object)) + >>> test_fused_memslice_other_dtypes(np.arange(10, dtype=np.object_)) object[:] object[:] 5 6 """ cdef memslice_fused_dtype[:] b = a @@ -860,7 +860,7 @@ def test_fused_memslice(memslice_fused a): float[:] float[:] 5.0 6.0 >>> test_fused_memslice(np.arange(10, dtype=np.dtype('i'))) int[:] int[:] 5 6 - >>> test_fused_memslice(np.arange(10, dtype=np.object)) + >>> test_fused_memslice(np.arange(10, dtype=np.object_)) object[:] object[:] 5 6 """ cdef memslice_fused b = a |