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.
array_equal
1 parent 2117b59 commit a70154eCopy full SHA for a70154e
src/zarr/core/buffer/core.py
@@ -1,7 +1,6 @@
1
from __future__ import annotations
2
3
import sys
4
-import warnings
5
from abc import ABC, abstractmethod
6
from typing import (
7
TYPE_CHECKING,
@@ -458,11 +457,7 @@ def __repr__(self) -> str:
458
457
return f"<NDBuffer shape={self.shape} dtype={self.dtype} {self._data!r}>"
459
460
def all_equal(self, other: Any) -> bool:
461
- with warnings.catch_warnings():
462
- warnings.filterwarnings(
463
- "ignore", r"invalid value encountered in equal", category=RuntimeWarning
464
- )
465
- return bool((self._data == other).all())
+ return np.array_equal(self._data, other, equal_nan=True)
466
467
def fill(self, value: Any) -> None:
468
self._data.fill(value)
0 commit comments