Skip to content

Commit

Permalink
Use isnull
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Gorelli <marcogorelli@protonmail.com>
  • Loading branch information
michaelosthege and MarcoGorelli authored Jan 25, 2021
1 parent f0f8d83 commit cb57680
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymc3/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ def pandas_to_array(data):
if hasattr(data, "to_numpy"):
# typically, but not limited to pandas objects
vals = data.to_numpy()
mask = np.isnan(vals)
mask = data.isnull().to_numpy()
if mask.any():
# there are missing values
ret = np.ma.MaskedArray(vals, mask)
Expand Down

0 comments on commit cb57680

Please sign in to comment.