diff --git a/src/finam/data/grid_base.py b/src/finam/data/grid_base.py index 89769bbacd8916c29818695177136993473e26b1..b45bc979d20a8774c337bae8c82eeefc1a0c262c 100644 --- a/src/finam/data/grid_base.py +++ b/src/finam/data/grid_base.py @@ -220,10 +220,14 @@ class Grid(GridBase): ): return False - if self.data_shape != other.data_shape: + if check_location and self.data_shape != other.data_shape: return False - return np.allclose(self.data_points, other.data_points) + return ( + np.allclose(self.points, other.points) + and self.cells == other.cells + and self.cell_types == other.cell_types + ) def __eq__(self, other): return self.compatible_with(other) @@ -424,7 +428,7 @@ class StructuredGrid(Grid): ): return False - if self.data_shape != ( + if check_location and self.data_shape != ( other.data_shape[::-1] if self.axes_reversed != other.axes_reversed else other.data_shape