Skip to content

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

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
shixun404 pushed a commit to shixun404/cupynumeric that referenced this pull request Sep 18, 2025
* a little consistency between eager/deferred modules

* pass deferred arrays to _call_full

* avoid runtime getattr in ufuncs

* split out where check to simplify _prepare_operands

* fix test
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