Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cupy/_core/_scalar.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ cdef object _numpy_float32 = numpy.float32
cdef object _numpy_float64 = numpy.float64
cdef object _numpy_complex64 = numpy.complex64
cdef object _numpy_complex128 = numpy.complex128
cdef object _numpy_float_ = numpy.float_
cdef object _numpy_complex_ = numpy.complex_
cdef object _numpy_float_ = numpy.float64
cdef object _numpy_complex_ = numpy.complex128


cpdef str get_typename(dtype):
Expand Down
4 changes: 2 additions & 2 deletions cupy/_core/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ cdef class _ndarray_base:
>>> import cupy
>>> a = cupy.zeros((2,))
>>> i = cupy.arange(10000) % 2
>>> v = cupy.arange(10000).astype(cupy.float_)
>>> v = cupy.arange(10000).astype(cupy.float64)
>>> a[i] = v
>>> a # doctest: +SKIP
array([9150., 9151.])
Expand All @@ -1562,7 +1562,7 @@ cdef class _ndarray_base:
>>> import numpy
>>> a_cpu = numpy.zeros((2,))
>>> i_cpu = numpy.arange(10000) % 2
>>> v_cpu = numpy.arange(10000).astype(numpy.float_)
>>> v_cpu = numpy.arange(10000).astype(numpy.float64)
>>> a_cpu[i_cpu] = v_cpu
>>> a_cpu
array([9998., 9999.])
Expand Down
2 changes: 1 addition & 1 deletion tests/cupy_tests/random_tests/test_bit_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def check_seed(self, seed):
def test_seed_not_none(self, dtype):
self.check_seed(dtype(0))

@testing.for_dtypes([numpy.complex_])
@testing.for_dtypes([numpy.complex128])
def test_seed_invalid_type_complex(self, dtype):
with self.assertRaises(TypeError):
self.bg(dtype(0))
Expand Down
2 changes: 1 addition & 1 deletion tests/cupy_tests/random_tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def check_seed(self, seed):
def test_seed_not_none(self, dtype):
self.check_seed(dtype(0))

@testing.for_dtypes([numpy.complex_])
@testing.for_dtypes([numpy.complex128])
def test_seed_invalid_type_complex(self, dtype):
with self.assertRaises(TypeError):
self.rs.seed(dtype(0))
Expand Down