@@ -302,7 +302,7 @@ def get_path(self, x: int, y: int) -> List[Tuple[int, int]]:
302302
303303def maxarray (
304304 shape : Tuple [int , ...], dtype : Any = np .int32 , order : str = "C"
305- ) -> np .array :
305+ ) -> np .ndarray :
306306 """Return a new array filled with the maximum finite value for `dtype`.
307307
308308 `shape` is of the new array. Same as other NumPy array initializers.
@@ -321,7 +321,7 @@ def maxarray(
321321 return np .full (shape , np .iinfo (dtype ).max , dtype , order )
322322
323323
324- def _export_dict (array : np .array ) -> Dict [str , Any ]:
324+ def _export_dict (array : np .ndarray ) -> Dict [str , Any ]:
325325 """Convert a NumPy array into a format compatible with CFFI."""
326326 if array .dtype .type not in _INT_TYPES :
327327 raise TypeError (
@@ -337,7 +337,7 @@ def _export_dict(array: np.array) -> Dict[str, Any]:
337337 }
338338
339339
340- def _export (array : np .array ) -> Any :
340+ def _export (array : np .ndarray ) -> Any :
341341 """Convert a NumPy array into a ctype object."""
342342 return ffi .new ("struct NArray*" , _export_dict (array ))
343343
@@ -365,8 +365,8 @@ def _compile_cost_edges(edge_map: Any) -> Tuple[Any, int]:
365365
366366
367367def dijkstra2d (
368- distance : np .array ,
369- cost : np .array ,
368+ distance : np .ndarray ,
369+ cost : np .ndarray ,
370370 cardinal : Optional [int ] = None ,
371371 diagonal : Optional [int ] = None ,
372372 * ,
@@ -516,13 +516,13 @@ def _compile_bool_edges(edge_map: Any) -> Tuple[Any, int]:
516516
517517
518518def hillclimb2d (
519- distance : np .array ,
519+ distance : np .ndarray ,
520520 start : Tuple [int , int ],
521521 cardinal : Optional [bool ] = None ,
522522 diagonal : Optional [bool ] = None ,
523523 * ,
524524 edge_map : Any = None
525- ) -> np .array :
525+ ) -> np .ndarray :
526526 """Return a path on a grid from `start` to the lowest point.
527527
528528 `distance` should be a fully computed distance array. This kind of array
0 commit comments