Skip to content

Add a roundtrip cast for datetimes #79

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 3 commits into from
Jul 24, 2023
Merged

Conversation

ngoldbaum
Copy link
Member

For the string to datetime cast I made it so it errors if you do e.g. string_array.astype('datetime64'), forcing the user to specify a unit. I don't think there's a way to give a more useful answer without guessing about the unit or doing value-based promotion.

I also had to update the includes to target the Numpy 2.0 C API and cleaned up some unneeded includes and usage of private numpy macros as well.

@ngoldbaum ngoldbaum merged commit a1c811f into numpy:main Jul 24, 2023
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.

1 participant