Skip to content

Commit

Permalink
fix numerical encoder sign none handling
Browse files Browse the repository at this point in the history
  • Loading branch information
paxcema committed Jun 13, 2023
1 parent 3babcd9 commit 8c7b78f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightwood/encoder/numeric/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def encode(self, data: Union[np.ndarray, pd.Series]):
data = data.values

if not self.positive_domain:
sign_data = np.nan_to_num(data, nan=0, posinf=0, neginf=0)
sign_data = np.nan_to_num(data.astype(float), nan=0, posinf=0, neginf=0)
sign = np.vectorize(self._sign_fn, otypes=[float])(sign_data)
else:
sign = np.zeros(len(data))
Expand Down

0 comments on commit 8c7b78f

Please sign in to comment.