avoid DeprecationWarning

This commit is contained in:
NM512
2023-06-18 17:18:24 +09:00
parent e3329b35e5
commit b408067d9a
4 changed files with 8 additions and 7 deletions

View File

@@ -77,8 +77,8 @@ class CollectDataset:
dtype = {16: np.int16, 32: np.int32, 64: np.int64}[self._precision]
elif np.issubdtype(value.dtype, np.uint8):
dtype = np.uint8
elif np.issubdtype(value.dtype, np.bool):
dtype = np.bool
elif np.issubdtype(value.dtype, bool):
dtype = bool
else:
raise NotImplementedError(value.dtype)
return value.astype(dtype)