-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT: core: Remove duplicated inner loop e->e from log, exp, sin, cos, sqrt. #14554
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
Conversation
…os, sqrt. The ufuncs log, exp, sin, cos and sqrt had two occurrences of the signature ee->e, with the corresponding generic loop function PyUFunc_e_e_As_f_f. This change removes the generation of the duplicated function from the array of inner loops for these ufuncs. The *first* entry of ee->e is kept; tests fail if the first one is removed instead of the second.
I'm not sure what is going on with the PyPy tests. Apparently PyPy thinks From the test run...
The first error...
|
Not related to this PR. I am checking ... |
That is a syntax error (at least, in regular python 3.7 code). It should be -self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)')
+self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)') |
Edit: wrong analysis: the problem is an old vendored version of pycparser inside PyPy |
The reason it turned up now is that PyPy added the deprecation warnings (that exist in CPython3.6 since it was released) last night. In the mean time, I backed that change out of PyPy to unbreak NumPy builds |
I edited my comment above, but just to make it clear: PyPy had an old vendored version of pycparser. Sorry for implying there were unresolved issues in the latest pycparser release |
@mattip, thanks for tracking down the issue. |
OK, should be harmless (although in some cases it might take a few cpu cylce extra if there is a loop too much) and no need to have duplicate entries. Thanks @WarrenWeckesser. |
The ufuncs log, exp, sin, cos and sqrt had two occurrences of the signature
e->e, with the corresponding generic loop function PyUFunc_e_e_As_f_f.
This change removes the generation of the duplicated function from the
array of inner loops for these ufuncs. The first entry of e->e is
kept; tests fail if the first one is removed instead of the second.