Skip to content

API: no_default #30788

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 1 commit into from
Jan 7, 2020
Merged

API: no_default #30788

merged 1 commit into from
Jan 7, 2020

Conversation

TomAugspurger
Copy link
Contributor

Changes lib._no_default to lib.no_default, uses it in more places.

Closes #30785

@TomAugspurger TomAugspurger added this to the 1.0 milestone Jan 7, 2020
@WillAyd
Copy link
Member

WillAyd commented Jan 7, 2020

lgtm if green

@@ -2270,7 +2270,7 @@ def map_infer_mask(ndarray arr, object f, const uint8_t[:] mask, bint convert=1,
result = np.empty(n, dtype=dtype)
for i in range(n):
if mask[i]:
if na_value is _no_default:
if na_value is no_default:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having a cdef version (kind of like we have for NaT) would help perf here (not necessary for this PR)

@@ -1,5 +1,5 @@
"""Public API for extending pandas objects."""
from pandas._libs.lib import _no_default # noqa: F401
from pandas._libs.lib import no_default # noqa: F401
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want this available to library authors, but we never want users to use this, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be fine for users. I can imagine people working with the signature of functions that use no_default.

@TomAugspurger
Copy link
Contributor Author

Merging since I have a followup depending on this. Will respond more on #30788 (comment) if needed.

@TomAugspurger TomAugspurger merged commit be1556c into pandas-dev:master Jan 7, 2020
@TomAugspurger TomAugspurger deleted the no_default branch January 7, 2020 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename api.extensions._no_default to extension.no_default
3 participants