Skip to content

Commit b3503c5

Browse files
committed
🐛 Remove incorrect looping from grid check
1 parent ba03946 commit b3503c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

simvue/api/objects/grids.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@
3333
__all__ = ["Grid"]
3434

3535

36-
def check_ordered_array(axis_ticks: list[float] | numpy.ndarray) -> list[float]:
36+
def check_ordered_array(
37+
axis_ticks: list[list[float]] | numpy.ndarray,
38+
) -> list[list[float]]:
3739
"""Returns if array is ordered or reverse ordered."""
3840
if isinstance(axis_ticks, numpy.ndarray):
3941
axis_ticks = axis_ticks.tolist()
4042
for i, _array in enumerate(axis_ticks):
41-
if not isinstance(_array[i], float):
43+
if not isinstance(_array[0], float):
4244
raise ValueError("Ordering can only be checked on a 1D array")
4345
_array = numpy.array(_array)
4446
if not numpy.all(numpy.sort(_array) == _array) or numpy.all(

0 commit comments

Comments
 (0)