Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small change to eliminate obsolete np.int calls #738

Merged
merged 10 commits into from
Sep 18, 2023
4 changes: 2 additions & 2 deletions sfaira/data/store/carts/single.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def _validate_idx(self, idx: Union[np.ndarray, list]) -> np.ndarray:
assert len(idx) == len(np.unique(idx)), f"repeated indices in idx: {len(idx) - len(np.unique(idx))}"
if isinstance(idx, np.ndarray):
assert len(idx.shape) == 1, idx.shape
assert idx.dtype == np.int
assert idx.dtype == int
else:
assert isinstance(idx, list)
assert isinstance(idx[0], int) or isinstance(idx[0], np.int)
assert isinstance(idx[0], int) or isinstance(idx[0], int)
idx = np.asarray(idx)
return idx

Expand Down
Loading