Skip to content

Commit

Permalink
Merge pull request #8109 from kmaehashi/fix-8018
Browse files Browse the repository at this point in the history
Do not use `from-import`
  • Loading branch information
emcastillo committed Jan 16, 2024
2 parents 02b69f0 + 59df43e commit 834c376
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cupy/random/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def __getattr__(key):
# users use the class for type annotation.
if key == 'Generator':
# Lazy import libraries depending on cuRAND
from cupy.random._generator_api import Generator
_cupy.random.Generator = Generator
return Generator
import cupy.random._generator_api as _generator_api
_cupy.random.Generator = _generator_api.Generator
return _generator_api.Generator
raise AttributeError(f"module '{__name__}' has no attribute '{key}'")


Expand Down

0 comments on commit 834c376

Please sign in to comment.