From 3ff07151bcb83fb2b0e388c8ee24daf9ebd6aeef Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Thu, 18 Dec 2025 15:26:41 -0500 Subject: [PATCH] use the result of the broadcasted array to check the contents Isn't this the point? I'm implementing a super innefficient broadcast operation for my lazy array, but then i stuck on the fact that I didn't implement a very inefficient operation for `np.array_equal` --- src/zarr/core/buffer/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zarr/core/buffer/core.py b/src/zarr/core/buffer/core.py index f0d01566c3..c402904049 100644 --- a/src/zarr/core/buffer/core.py +++ b/src/zarr/core/buffer/core.py @@ -542,7 +542,7 @@ def all_equal(self, other: Any, equal_nan: bool = True) -> bool: # every single time we have to write data? _data, other = np.broadcast_arrays(self._data, other) return np.array_equal( - self._data, + _data, other, equal_nan=equal_nan if self._data.dtype.kind not in ("U", "S", "T", "O", "V")