-
Notifications
You must be signed in to change notification settings - Fork 19
Replace inner1d bei einsum #163
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
|
I like the PEP8 changes, except for the spaces around
"definitely" is quite a strong word. "improvement", too. What if it's much slower? |
|
I guess some instances can be replaced with the |
|
The test for Python 3.5 fails as the installed I also very much dislike Python 3.5 and would simply remove support for it. |
|
The other test fails as |
|
I created a pull request where I run the tests directly on Github (and skip Python 3.5): #166 |
|
I rebased the master, now the tests are passing. |
|
I rebased and made code work for recent 0.6.1 / 0.6.2. We will need a handling once inner1d() is discontinued, so it might be a good idea to keep this einsum() handling up to date. I would vote using this some time. |
|
Could this be merged? Here's the issue on numpy/numpy#10815 they suggest using
|
|
we can close this, because #180 handled this in another way |
We use
from numpy.core.umath_tests import inner1d as _inner1dwhich is suboptimal, since its deprecated and requires non-standard library import.
See also #77
We could use numpy's
einsumdo to this job instead, thus I've changed (hopefully) all occurrences ofinner1dtoeinsum.Besides that in the files, some PEP8 modifications were done, these suggestions came from PyCharm.
Maybe numpy's
tensordotis even more performant/suitable. I don't know currently how/if these functions support parallel computation, whichinner1dseemed to do and was chosen for. I will check this.In the meantime, using
einsumin this PR is definitely an improvement for the code.