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
I always find Series.clip() a bit confusing because the order of
arguments are reversed compared with Numpy's clip() method:
Series.clip(self, upper=None, lower=None)
numpy.clip(a, a_min, a_max, out=None)
Also, the following doesn't work well:
x = Series(data=np.random.uniform(size=10))
np.clip(x, 0.4, 0.6)
I think numpy.clip is checking for the existence of the clip() method
on the Series and attempting to pass the arguments to Series.clip().
Since Series.clip() doesn't support the axis argument this approach
fails. Ideally, I'd prefer to be able to use clip() without having to
check whether the data is a numpy.ndarray or pandas.Series object.
The text was updated successfully, but these errors were encountered:
from @bburan
The text was updated successfully, but these errors were encountered: