We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f269274 commit e453290Copy full SHA for e453290
qlib/rl/utils/finite_env.py
@@ -59,7 +59,7 @@ def is_invalid(arr: int | float | bool | np.ndarray | dict | list | tuple) -> bo
59
if isinstance(arr, np.ndarray):
60
if np.issubdtype(arr.dtype, np.floating):
61
return np.isnan(arr).all()
62
- return (np.iinfo(arr.dtype).max == arr).all()
+ return cast(np.ndarray, np.iinfo(arr.dtype).max == arr).all()
63
if isinstance(arr, dict):
64
return all(is_invalid(o) for o in arr.values())
65
if isinstance(arr, (list, tuple)):
0 commit comments