Skip to content

Implement DataFrame.__array_ufunc__ #36955

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

Merged
merged 20 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0d725e8
Implement DataFrame.__array_ufunc__
TomAugspurger Oct 6, 2020
c4c1470
remove unnecessary decorator
TomAugspurger Oct 7, 2020
4fcb1a4
Fixup
TomAugspurger Oct 7, 2020
971659e
fixup finalize
TomAugspurger Oct 7, 2020
6bd73dc
whatsnew
TomAugspurger Oct 7, 2020
1085be4
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Oct 7, 2020
0afdf49
fixup
TomAugspurger Oct 7, 2020
2260c83
fixup
TomAugspurger Oct 8, 2020
b3239e2
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Oct 8, 2020
b1d93f5
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Oct 9, 2020
9cfcba1
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Oct 18, 2020
919ebb5
Move to arraylike
TomAugspurger Oct 18, 2020
c73ab12
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Nov 12, 2020
99acb86
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Nov 13, 2020
acfe434
union
TomAugspurger Nov 13, 2020
9a35023
Merge remote-tracking branch 'upstream/master' into frame-array-ufunc
TomAugspurger Nov 14, 2020
2371499
Merge branch 'master' of https://github.com/pandas-dev/pandas into fr…
jbrockmendel Nov 20, 2020
d283446
Merge branch 'master' of https://github.com/pandas-dev/pandas into fr…
jbrockmendel Nov 22, 2020
816c6dc
Merge branch 'master' of https://github.com/pandas-dev/pandas into fr…
jbrockmendel Nov 25, 2020
a6b120a
docstring, typo fixup
jbrockmendel Nov 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/source/whatsnew/v1.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,9 @@ Other

- Bug in :meth:`DataFrame.replace` and :meth:`Series.replace` incorrectly raising ``AssertionError`` instead of ``ValueError`` when invalid parameter combinations are passed (:issue:`36045`)
- Bug in :meth:`DataFrame.replace` and :meth:`Series.replace` with numeric values and string ``to_replace`` (:issue:`34789`)
- Fixed metadata propagation in :meth:`Series.abs` and ufuncs called on Series (:issue:`28283`)
- Fixed metadata propagation in the :class:`Series.dt` and :class:`Series.str` accessors (:issue:`28283`)
- Fixed metadata propagation in :meth:`Series.abs` and ufuncs called on Series and DataFrames (:issue:`28283`)
- Fixed bug in metadata propagation incorrectly copying DataFrame columns as metadata when the column name overlaps with the metadata name (:issue:`37037`)
- Fixed metadata propagation in the :class:`Series.dt`, :class:`Series.str` accessors, :class:`DataFrame.duplicated`, :class:`DataFrame.stack`, :class:`DataFrame.unstack`, :class:`DataFrame.pivot`, :class:`DataFrame.append`, :class:`DataFrame.diff`, :class:`DataFrame.applymap` and :class:`DataFrame.update` methods (:issue:`28283`) (:issue:`37381`)
- Bug in :meth:`Index.union` behaving differently depending on whether operand is a :class:`Index` or other list-like (:issue:`36384`)
- Passing an array with 2 or more dimensions to the :class:`Series` constructor now raises the more specific ``ValueError``, from a bare ``Exception`` previously (:issue:`35744`)
- Bug in ``accessor.DirNamesMixin``, where ``dir(obj)`` wouldn't show attributes defined on the instance (:issue:`37173`).
Expand Down
1 change: 1 addition & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ def view(self, dtype=None) -> "Series":

# ----------------------------------------------------------------------
# NDArray Compat
_HANDLED_TYPES = (Index, ExtensionArray, np.ndarray)

def __array__(self, dtype=None) -> np.ndarray:
"""
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.