Skip to content
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

CI: fix npdev build #41665

Closed
wants to merge 5 commits into from
Closed

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented May 25, 2021

hopefully numpy will provide an alternative that makes this unnecessary

@jbrockmendel jbrockmendel changed the title Npdev CI: fix npdev build May 25, 2021
@simonjayhawkins simonjayhawkins added CI Continuous Integration Compat pandas objects compatability with Numpy or Python functions labels May 26, 2021
@simonjayhawkins
Copy link
Member

@jbrockmendel you are changing the code here for unreleased compat issues. IIUC numpy may make some further changes. would it be better to add something to the 54 failing tests for now?

@jbrockmendel
Copy link
Member Author

I'm holding out hope that numpy will handle this upstream, xref numpy/numpy#19078

@@ -1583,7 +1584,9 @@ def searchsorted(arr, value, side="left", sorter=None) -> np.ndarray:
# and `value` is a pd.Timestamp, we may need to convert value
arr = ensure_wrapped_if_datetimelike(arr)

return arr.searchsorted(value, side=side, sorter=sorter)
with catch_warnings():
filterwarnings("ignore", category=FutureWarning)
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't u use create_ndarray here?

Copy link
Member Author

Choose a reason for hiding this comment

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

bc value can be a scalar here

@jbrockmendel
Copy link
Member Author

@seberg should we just suppress these warnings for the time being in expectation of a fix/change upstream?

@ahawryluk ahawryluk mentioned this pull request May 31, 2021
4 tasks
@jbrockmendel jbrockmendel deleted the npdev branch May 31, 2021 16:23
@seberg
Copy link
Contributor

seberg commented Jun 2, 2021

Sorry about being away for the long weekend. I will look into this again, but I got the feeling that you will likely need some type of helper like create_ndarray in any case. Hopefully, we can avoid the warning context at least, though.

@seberg
Copy link
Contributor

seberg commented Jun 2, 2021

We just discussed this in the numpy call, and I think the most likely solution will be to (unfortunately) delay the deprecation, to give you more time and hopefully a better solution to this.

That would mean you don't have to worry about string promotion changes for this release.

@jbrockmendel
Copy link
Member Author

jbrockmendel commented Jun 4, 2021

OK. Is there anything I/we can do short(ish)-term to make the process easier on your end? (e.g. reopen this PR)

@seberg
Copy link
Contributor

seberg commented Jun 4, 2021

@jorisvandenbossche not sure. Maybe we can meet up briefly and discuss how well np.discover_array_params would help you (I am very flexible)? And also what pandas needs right now in terms of dtype/descriptor discovery from NumPy?
(Plus, I guess what pandas actually does itself, since you currently need those multiple passes before and after the NumPy pass.)

I have some hopes that we could both clean up pandas and make NumPy and pandas work better together in one go with just small modifications to NumPy (and exposure of the new API). And that would just solve this issue incidentally.

@jbrockmendel
Copy link
Member Author

Maybe we can meet up briefly and discuss

Sure. I'm in UTC-7, can do any AM between now and Tuesday, inclusive.

@seberg
Copy link
Contributor

seberg commented Jun 4, 2021

Great! Send you an invite, in case anyone is curious, put the details here also: https://hackmd.io/fe_VHCBjSwutSwhpPP8KSg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants