From 6676fefc7842e41c10ca735afccc241fad0d1d6e Mon Sep 17 00:00:00 2001 From: Gavin Chan Date: Sat, 19 Aug 2023 23:48:34 +0800 Subject: [PATCH] fix: revert forcing numpy array conversion --- src/fpm_risk_model/risk_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fpm_risk_model/risk_model.py b/src/fpm_risk_model/risk_model.py index 5b2c839..5b9fb3d 100644 --- a/src/fpm_risk_model/risk_model.py +++ b/src/fpm_risk_model/risk_model.py @@ -112,9 +112,9 @@ def _to_numpy(values: Union[ndarray, DataFrame]) -> ndarray: if values is None: return values elif isinstance(values, (DataFrame, Series)): - return np.array(values.values) + return values.values elif isinstance(values, ndarray): - return np.array(values) + return values else: raise TypeError( "Expect either pandas DataFrame or numpy array, "