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 c55ffa4Copy full SHA for c55ffa4
src/zarr/core/buffer/core.py
@@ -457,7 +457,12 @@ 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
+ result = np.array_equal(
463
+ self._data, np.broadcast_to(other, self._data.shape), equal_nan=True
464
+ )
465
+ return result
466
467
def fill(self, value: Any) -> None:
468
self._data.fill(value)
0 commit comments