You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where bins argument isn't provided by the user. Both np.min and np.max functions may return nan if the var array has nan values. I think simply replacing them with np.nanmin and np.nanmax would fix this issue. Otherwise just an error message would be nice at this point because currently matplotlib throws an error which is hard to trace to this issue.
The text was updated successfully, but these errors were encountered:
While I do like the np.nan(min/max) idea I think that we should not assume a lot about user data. Maybe checking for NaNs and trowing an error is better and let the user fix that in the way they prefer, like specifying the bins or using the nan min/max themselves.
windrose/windrose/windrose.py
Lines 373 to 375 in 47ab1b5
In cases where
bins
argument isn't provided by the user. Bothnp.min
andnp.max
functions may returnnan
if thevar
array hasnan
values. I think simply replacing them withnp.nanmin
andnp.nanmax
would fix this issue. Otherwise just an error message would be nice at this point because currentlymatplotlib
throws an error which is hard to trace to this issue.The text was updated successfully, but these errors were encountered: