File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from functools import wraps , partial
33
44import numpy as np
5+ from numpy .typing import NDArray
56
67# Public interface.
78__all__ = ["pareto_front" , "cost_function" , "np_cdist" ,
@@ -117,7 +118,7 @@ def pareto_front(points: list) -> list:
117118 return list (pareto_points )
118119# _end_def_
119120
120- def np_pareto_front (points : np . ndarray ) -> np . ndarray :
121+ def np_pareto_front (points : NDArray ) -> NDArray :
121122 """
122123 Simple function that calculates the Pareto (optimal)
123124 front points from a given input points numpy array.
@@ -205,7 +206,7 @@ def function_wrapper(*args, **kwargs) -> dict:
205206 return function_wrapper
206207# _end_def_
207208
208- def np_cdist (x_pos : np . ndarray , scaled : bool = False ) -> np . ndarray :
209+ def np_cdist (x_pos : NDArray , scaled : bool = False ) -> NDArray :
209210 """
210211 This is equivalent to the scipy.spatial.distance.cdist method with Euclidean
211212 distance metric. It is a tailored version for the purposes of the multimodal
You can’t perform that action at this time.
0 commit comments