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 ba03946 commit b3503c5Copy full SHA for b3503c5
simvue/api/objects/grids.py
@@ -33,12 +33,14 @@
33
__all__ = ["Grid"]
34
35
36
-def check_ordered_array(axis_ticks: list[float] | numpy.ndarray) -> list[float]:
+def check_ordered_array(
37
+ axis_ticks: list[list[float]] | numpy.ndarray,
38
+) -> list[list[float]]:
39
"""Returns if array is ordered or reverse ordered."""
40
if isinstance(axis_ticks, numpy.ndarray):
41
axis_ticks = axis_ticks.tolist()
42
for i, _array in enumerate(axis_ticks):
- if not isinstance(_array[i], float):
43
+ if not isinstance(_array[0], float):
44
raise ValueError("Ordering can only be checked on a 1D array")
45
_array = numpy.array(_array)
46
if not numpy.all(numpy.sort(_array) == _array) or numpy.all(
0 commit comments