Skip to content

MAINT: Ensure that fmin loops do not show up multiple times#22466

Merged
charris merged 1 commit intonumpy:mainfrom
seberg:fminmax-loops
Oct 23, 2022
Merged

MAINT: Ensure that fmin loops do not show up multiple times#22466
charris merged 1 commit intonumpy:mainfrom
seberg:fminmax-loops

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Oct 21, 2022

This is not problematic for NumPy, because fmin/fmax have a custom type resolver, however, Numba relies on the order (they should not ideally, but probably have little choice currently). Even without Numba, having the multiple loops is not nice though.

Closes gh-22376

This is not problematic for NumPy, because fmin/fmax have a custom
type resolver, however, Numba relies on the order (they should not
ideally, but probably have little choice currently).
Even without Numba, having the multiple loops is not nice though.

Closes numpygh-22376
@mattip
Copy link
Copy Markdown
Member

mattip commented Oct 23, 2022

Should we add a test that no ufunc has a repeated left side of types, i.e.

assert len(set([t.split('->')[0] for t in ufunc.types])) == len(ufunc.types)

@charris charris merged commit c679644 into numpy:main Oct 23, 2022
@charris
Copy link
Copy Markdown
Member

charris commented Oct 23, 2022

Thanks Sebastian.

Should we add a test that no ufunc has a repeated left side of types

We might want to make a careful review at some point.

@seberg seberg deleted the fminmax-loops branch October 24, 2022 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: should ufunc .types attr contain ISA specific loop variants?

3 participants