fixed np.float warning

This commit is contained in:
robertmartin8
2021-10-19 20:25:52 +01:00
parent f370a89778
commit 82b04e1069

View File

@@ -196,7 +196,7 @@ class BaseConvexOptimizer(BaseOptimizer):
if len(test_bounds) == self.n_assets and not isinstance(
test_bounds[0], (float, int)
):
bounds = np.array(test_bounds, dtype=np.float)
bounds = np.array(test_bounds, dtype=float)
self._lower_bounds = np.nan_to_num(bounds[:, 0], nan=-np.inf)
self._upper_bounds = np.nan_to_num(bounds[:, 1], nan=np.inf)
else: