mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Make get_instance_features return np.ndarray
This commit is contained in:
@@ -622,11 +622,13 @@ class PyomoTestInstanceKnapsack(Instance):
|
||||
return model
|
||||
|
||||
@overrides
|
||||
def get_instance_features(self) -> List[float]:
|
||||
return [
|
||||
self.capacity,
|
||||
np.average(self.weights),
|
||||
]
|
||||
def get_instance_features(self) -> np.ndarray:
|
||||
return np.array(
|
||||
[
|
||||
self.capacity,
|
||||
np.average(self.weights),
|
||||
]
|
||||
)
|
||||
|
||||
@overrides
|
||||
def get_variable_features(self) -> Dict[str, List[float]]:
|
||||
|
||||
Reference in New Issue
Block a user