-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: ExtensionArray.repeat #24349
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: ExtensionArray.repeat #24349
Conversation
Hello @TomAugspurger! Thanks for submitting the PR.
|
@@ -987,7 +987,8 @@ update the ``ExtensionDtype._metadata`` tuple to match the signature of your | |||
|
|||
**Other changes** | |||
|
|||
- ``ExtensionArray`` has gained the abstract methods ``.dropna()`` (:issue:`21185`) |
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.
This method isn't abstract.
def repeat(self, repeats, axis=None): | ||
""" | ||
Repeat elements of an array. | ||
|
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.
Need a versionadded. Will do that on merge maybe, unless there are other comments on the implementation.
Codecov Report
@@ Coverage Diff @@
## master #24349 +/- ##
==========================================
- Coverage 92.29% 92.29% -0.01%
==========================================
Files 162 162
Lines 51806 51813 +7
==========================================
+ Hits 47815 47821 +6
- Misses 3991 3992 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24349 +/- ##
==========================================
+ Coverage 92.29% 92.29% +<.01%
==========================================
Files 162 162
Lines 51806 51815 +9
==========================================
+ Hits 47815 47824 +9
Misses 3991 3991
Continue to review full report at Codecov.
|
do we have interactions with our other defintiions of this series.py and indexes/base.py? maybe create an issue to investigate this code duplication (same for searchsorted) |
Added a fixture to parametrize the test across ExtensionArray.repeat and
Series.repeat.
I don't think there's any code duplication that could be removed. Series
needs to handle repeating the index, and just dispatches to `._values` for
repeating the array.
…On Wed, Dec 19, 2018 at 8:26 AM Jeff Reback ***@***.***> wrote:
do we have interactions with our other defintiions of this series.py and
indexes/base.py? maybe create an issue to investigate this code duplication
(same for searchsorted)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24349 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIk2RNEBe9veEuB-kySoCs0uQiJBSks5u6kyugaJpZM4ZaLkl>
.
|
All green. |
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.
these methods are in api.rst?
ExtensionArray is an auto summary, so these will be added automatically.
Though now that I think about it, it won't have the "private" methods like
_from_sequnce,
since numpydoc / autodoc excludes items starting with an `_`. But I guess
they'll be looking
at the source / GitHub anyway.
…On Thu, Dec 20, 2018 at 8:38 AM Jeff Reback ***@***.***> wrote:
***@***.**** approved this pull request.
these methods are in api.rst?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24349 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIjlQR2W_pg1KackhRkPJLVs7c5-Cks5u66DhgaJpZM4ZaLkl>
.
|
cc @jreback