Fix compatibility with latest cupy. (#8129)

* Fix compatibility with latest cupy.

* Freeze mypy.
This commit is contained in:
Jiaming Yuan 2022-08-01 15:24:42 +08:00 committed by GitHub
parent 24c2373080
commit 2cba1d9fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -749,8 +749,9 @@ def _is_cudf_ser(data: DataType) -> bool:
def _is_cupy_array(data: DataType) -> bool:
return lazy_isinstance(data, "cupy.core.core", "ndarray") or lazy_isinstance(
data, "cupy._core.core", "ndarray"
return any(
lazy_isinstance(data, n, "ndarray")
for n in ("cupy.core.core", "cupy", "cupy._core.core")
)

View File

@ -6,7 +6,7 @@ dependencies:
- pylint
- wheel
- setuptools
- mypy
- mypy=0.961
- numpy
- scipy
- pandas