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 a70154e commit 4a8fca0Copy full SHA for 4a8fca0
src/zarr/core/buffer/core.py
@@ -457,7 +457,11 @@ def __repr__(self) -> str:
457
return f"<NDBuffer shape={self.shape} dtype={self.dtype} {self._data!r}>"
458
459
def all_equal(self, other: Any) -> bool:
460
- return np.array_equal(self._data, other, equal_nan=True)
+ # other is expected to be a scalar
461
+ # use array_equal to obtain equal_nan=True functionality
462
+ data, other = np.broadcast_arrays(self._data, other)
463
+ result = np.array_equal(self._data, other, equal_nan=True)
464
+ return result
465
466
def fill(self, value: Any) -> None:
467
self._data.fill(value)
0 commit comments