Skip to content

Commit cd014ce

Browse files
committed
fix: ensure to_numpy converts with the numpy engine array
1 parent a05ce21 commit cd014ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fpm_risk_model/risk_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def _to_numpy(values: Union[ndarray, DataFrame]) -> ndarray:
112112
if values is None:
113113
return values
114114
elif isinstance(values, (DataFrame, Series)):
115-
return values.values
115+
return np.array(values.values)
116116
elif isinstance(values, ndarray):
117-
return values
117+
return np.array(values)
118118
else:
119119
raise TypeError(
120120
"Expect either pandas DataFrame or numpy array, "

0 commit comments

Comments
 (0)