-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add __array_ufunc__ to Series / Array #23293
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
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
2fffac3
Add __array_ufunc__ to Series / Array
jorisvandenbossche c5a4664
expand IntegerArray.__array_ufunc__
jorisvandenbossche dd332a4
fix Series.__array_ufunc__ and consolidate dispatch
jorisvandenbossche 71c058e
test Series array_ufunc fallback to numpy array for DecimalArray
jorisvandenbossche a0d11d9
fix import
jorisvandenbossche 4cfeb9b
first dispatch before getting underlying values (eg for Series[Period…
jorisvandenbossche 607f8a6
fix Categorical: disallow all ufunc apart from ops
jorisvandenbossche c4fcae7
simplify calling ufunc on underlying values
jorisvandenbossche 65dea1b
fix categorical not existing ops
jorisvandenbossche 134df14
np.positive not available for older numpy versions
jorisvandenbossche 5239b70
fix multiple return values
jorisvandenbossche 3d91885
skip IntegerArray tests for older numpy versions
jorisvandenbossche 429f15c
also deal with no return value
jorisvandenbossche 41f4158
clean-up debugging left-over
jorisvandenbossche 0d6a663
TST: Additional tests for Series ufuncs
TomAugspurger 8f46391
fixup release note
TomAugspurger 44e3c7e
fixups
TomAugspurger e179913
remove stale comment
TomAugspurger 27208c1
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger 0b1e745
xfail ufunc(series, index)
TomAugspurger 9be1dff
32-bit compat
TomAugspurger 775c2ef
fixup
TomAugspurger 4d7f249
wip
TomAugspurger 0b359d7
fixup release note
TomAugspurger bbbf269
Merge remote-tracking branch 'upstream/master' into series-array-ufunc
TomAugspurger 64d8908
more
TomAugspurger d1788b0
lint
TomAugspurger ef5d508
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger fe0ee4e
Merge branch 'series-array-ufunc' into jorisvandenbossche-array-ufunc
TomAugspurger 971e347
fixup! more
TomAugspurger 95e8aef
remove dead code
TomAugspurger 7bfd584
todos
TomAugspurger 06e5739
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger feee015
remove compat
TomAugspurger 3702b9b
object dtype tests
TomAugspurger a0f84ed
wip
TomAugspurger d83fe7a
doc, types
TomAugspurger edad466
compat
TomAugspurger e4ae8dc
fixups
TomAugspurger db60f6c
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger a9bd6ef
added matmul
TomAugspurger 1a8b807
start docs
TomAugspurger 0b0466d
compat
TomAugspurger 1f67866
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger d3089bd
ignore for numpydev
TomAugspurger 6e770e8
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger 15a3fb1
handle reduce
TomAugspurger b5e7f45
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger 4f4bd93
update
TomAugspurger 5dbff49
fixups
TomAugspurger b623be2
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger 2237233
raise for reduce
TomAugspurger 5b5c547
more tests
TomAugspurger 10bc2cc
more tests
TomAugspurger 5380b77
35 compat
TomAugspurger 9f4d110
remove old test
TomAugspurger 6c15ee7
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger ab48bd8
fixup
TomAugspurger 30fced8
Merge remote-tracking branch 'upstream/master' into jorisvandenbossch…
TomAugspurger 7486d26
Fixups
TomAugspurger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
Computational tools | ||
=================== | ||
|
||
|
||
Statistical functions | ||
--------------------- | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -886,6 +886,7 @@ Sparse | |
- Introduce a better error message in :meth:`Series.sparse.from_coo` so it returns a ``TypeError`` for inputs that are not coo matrices (:issue:`26554`) | ||
- Bug in :func:`numpy.modf` on a :class:`SparseArray`. Now a tuple of :class:`SparseArray` is returned (:issue:`26946`). | ||
|
||
TomAugspurger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Build Changes | ||
^^^^^^^^^^^^^ | ||
|
||
|
@@ -896,6 +897,7 @@ ExtensionArray | |
|
||
- Bug in :func:`factorize` when passing an ``ExtensionArray`` with a custom ``na_sentinel`` (:issue:`25696`). | ||
- :meth:`Series.count` miscounts NA values in ExtensionArrays (:issue:`26835`) | ||
- Added ``Series.__array_ufunc__`` to better handle NumPy ufuncs applied to Series backed by extension arrays (:issue:`23293`). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be a general item for |
||
- Keyword argument ``deep`` has been removed from :meth:`ExtensionArray.copy` (:issue:`27083`) | ||
|
||
Other | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.