-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
ENH: __array_ufunc__ handle np.minimum.reduce #43923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: __array_ufunc__ handle np.minimum.reduce #43923
Conversation
if self.ndim > 1: | ||
if isinstance(self, ABCNDFrame): | ||
# TODO: test cases where this doesn't hold, i.e. 2D DTA/TDA | ||
kwargs["numeric_only"] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we normally modify the inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, but that's bc the ufunc takes different kwargs than the DataFrame method
needs a whatsnew note |
has one |
np.mimum.reduce(frame) -> return Series instead of ndarray
np.maximum.reduce(series[dt64]) -> return Timestamp instead of np.datetime64
np.maximum.reduce(series[td64]) -> return Timedelta instead of np.timedelta64
np.maximum.reduce(DTA) -> return Timestamp instead of np.datetime64
np.maximum.reduce(TDA) -> return Timedelta instead of np.timedelta64
np.maximum.reduce(DTI) -> return Timestamp instead of np.datetime64
np.maximum.reduce(TDI) -> return Timedelta instead of np.timedelta64
np.maximum.reduce(integer_array) works instead of raising NotImplementedError
np.maximum.reduce(floating_array) works instead of raising NotImplementedError
np.maximum.reduce(Series[Int]) works instead of raising NotImplementedError
np.maximum.reduce(Series[Float]) works instead of raising NotImplementedError
Ditto for np.minimum.reduce