File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11# from xopt.generator import Generator
22import numpy as np
3- from typing import List , Optional
43
54
6- def get_domination (pop_f : np .ndarray , pop_g : Optional [ np .ndarray ] = None ) -> np .ndarray :
5+ def get_domination (pop_f : np .ndarray , pop_g : np .ndarray | None = None ) -> np .ndarray :
76 """
87 Compute domination matrix for a population based on objective values and constraints. Determines domination
98 relationships between all pairs of individuals in a population.
@@ -46,7 +45,7 @@ def get_domination(pop_f: np.ndarray, pop_g: Optional[np.ndarray] = None) -> np.
4645 return dom
4746
4847
49- def fast_dominated_argsort_internal (dom : np .ndarray ) -> List [np .ndarray ]:
48+ def fast_dominated_argsort_internal (dom : np .ndarray ) -> list [np .ndarray ]:
5049 """
5150 Used inside of `fast_dominated_argsort`. Call that function instead.
5251
@@ -83,8 +82,8 @@ def fast_dominated_argsort_internal(dom: np.ndarray) -> List[np.ndarray]:
8382
8483
8584def fast_dominated_argsort (
86- pop_f : np .ndarray , pop_g : Optional [ np .ndarray ] = None
87- ) -> List [np .ndarray ]:
85+ pop_f : np .ndarray , pop_g : np .ndarray | None = None
86+ ) -> list [np .ndarray ]:
8887 """
8988 Performs a dominated sort on matrix of objective function values O. This is a numpy implementation of the algorithm
9089 described in [1].
You can’t perform that action at this time.
0 commit comments