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

Resolve numpy 1.25 issues #973

Merged
merged 7 commits into from
Jun 23, 2023

Conversation

bryevdv
Copy link
Contributor

@bryevdv bryevdv commented Jun 21, 2023

This is an abridged version of #972 to clear up CI issues, that updates everything except a few more complicated uses of find_common_types.

A test_argsort.py test is failing for me locally, but also fails for me locally on branch-23.07 so I don't think it is related.

@bryevdv bryevdv requested a review from manopapad June 21, 2023 22:31
@manopapad manopapad added the category:bug-fix PR is a bug fix and will be classified as such in release notes label Jun 21, 2023
@@ -663,7 +663,7 @@ def arange(
step = 1

if dtype is None:
dtype = np.find_common_type([], [type(start), type(stop), type(step)])
dtype = np.result_type(type(start), type(stop), type(step))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@seberg is this OK or do we need to pass actual scalars?

Copy link
Contributor

Choose a reason for hiding this comment

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

find_common_type calls np.dtype() first while np.result_type tends to convert to arrays when it doens't see an exact scalar type or dtype. I think that could fail with the type() for very strange input.

So it should be a bit safer to pass the values (or use np.dtype(type(start)) to keep the identical behavior).
Passing values may also be more future-proof, but that goes into too much arange weirdness.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bryevdv bryevdv merged commit 0d46e7c into nv-legate:branch-23.07 Jun 23, 2023
@bryevdv bryevdv deleted the bv/numpy-1.25-hotfix branch June 23, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bug-fix PR is a bug fix and will be classified as such in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants