@@ -327,20 +327,20 @@ def _get_ordered_vertices(
327
327
np.ndarray
328
328
Array of vertices with shape (..., N+1) or (N+1,).
329
329
"""
330
- order = _get_order_of_core_dims (core_dim_orders )
331
-
332
330
if _is_bounds_monotonic (bounds ):
333
331
vertices = np .concatenate ((bounds [..., :, 0 ], bounds [..., - 1 :, 1 ]), axis = - 1 )
334
332
else :
333
+ order = _get_order_of_core_dims (core_dim_orders )
334
+
335
335
if order == "ascending" :
336
336
endpoints = np .minimum (bounds [..., :, 0 ], bounds [..., :, 1 ])
337
337
last_endpoint = np .maximum (bounds [..., - 1 , 0 ], bounds [..., - 1 , 1 ])
338
338
elif order == "descending" :
339
339
endpoints = np .maximum (bounds [..., :, 0 ], bounds [..., :, 1 ])
340
340
last_endpoint = np .minimum (bounds [..., - 1 , 0 ], bounds [..., - 1 , 1 ])
341
- elif order == "mixed" :
342
- raise ValueError (
343
- "Cannot determine vertices for non-monotonic bounds with mixed core "
341
+ else :
342
+ raise NotImplementedError (
343
+ f "Cannot determine vertices for non-monotonic bounds with ' { order } ' core "
344
344
"dimension orders. Try normalizing the coordinates to a monotonic "
345
345
"convention and try again."
346
346
)
0 commit comments