-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
API: no_default #30788
Conversation
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: |
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.
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 |
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.
we want this available to library authors, but we never want users to use this, right?
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.
It should be fine for users. I can imagine people working with the signature of functions that use no_default.
Merging since I have a followup depending on this. Will respond more on #30788 (comment) if needed. |
Changes lib._no_default to lib.no_default, uses it in more places.
Closes #30785