@@ -327,20 +327,20 @@ def _get_ordered_vertices(
327327 np.ndarray
328328 Array of vertices with shape (..., N+1) or (N+1,).
329329 """
330- order = _get_order_of_core_dims (core_dim_orders )
331-
332330 if _is_bounds_monotonic (bounds ):
333331 vertices = np .concatenate ((bounds [..., :, 0 ], bounds [..., - 1 :, 1 ]), axis = - 1 )
334332 else :
333+ order = _get_order_of_core_dims (core_dim_orders )
334+
335335 if order == "ascending" :
336336 endpoints = np .minimum (bounds [..., :, 0 ], bounds [..., :, 1 ])
337337 last_endpoint = np .maximum (bounds [..., - 1 , 0 ], bounds [..., - 1 , 1 ])
338338 elif order == "descending" :
339339 endpoints = np .maximum (bounds [..., :, 0 ], bounds [..., :, 1 ])
340340 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 "
344344 "dimension orders. Try normalizing the coordinates to a monotonic "
345345 "convention and try again."
346346 )
0 commit comments