Stop using `cupy` in `cupy/__init__.py`
@@ -346,7 +346,7 @@ def can_cast(from_, to, casting='safe'):
.. seealso:: :func:`numpy.can_cast`
"""
- from_ = from_.dtype if isinstance(from_, cupy.ndarray) else from_
+ from_ = from_.dtype if isinstance(from_, ndarray) else from_
return _numpy.can_cast(from_, to, casting=casting)
@@ -377,7 +377,7 @@ def result_type(*arrays_and_dtypes):
.. seealso:: :func:`numpy.result_type`
"""
- dtypes = [a.dtype if isinstance(a, cupy.ndarray)
+ dtypes = [a.dtype if isinstance(a, ndarray)
else a for a in arrays_and_dtypes]
return _numpy.result_type(*dtypes)
