Skip to content

Remove check of optimize arg#16

Merged
chillenb merged 3 commits into
chillenb:mainfrom
h-larsson:fix
Feb 20, 2026
Merged

Remove check of optimize arg#16
chillenb merged 3 commits into
chillenb:mainfrom
h-larsson:fix

Conversation

@h-larsson
Copy link
Copy Markdown
Contributor

a = np.arange(60.).reshape(3,4,5)
b = np.arange(24.).reshape(4,3,2)
np.einsum('ijk,jil->kl', a, b, optimize=("optimal",200))
path = np.einsum_path('ijk,ilm,njm,nlk,abc->',a,a,a,a,a,optimize='optimal')[0]
np.einsum('ijk,ilm,njm,nlk,abc->',a,a,a,a,a, optimize=path)

are both valid options. This seems to be supported by the implementation of einsum_path in pytblis, which checks the keyword argument.

@chillenb
Copy link
Copy Markdown
Owner

Thanks for the PR!

I was going to ask about the whitespace but then you fixed it immediately, lol.

@chillenb chillenb merged commit adca723 into chillenb:main Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants