Skip to content
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

einsum optimization may change dtype of output #11059

Open
toslunar opened this issue May 7, 2018 · 1 comment
Open

einsum optimization may change dtype of output #11059

toslunar opened this issue May 7, 2018 · 1 comment
Labels

Comments

@toslunar
Copy link
Contributor

toslunar commented May 7, 2018

intermediate array may have ndim=0.

>>> x = np.arange(3).astype(np.int64)
>>> y = np.arange(2).astype(np.int16)
>>> np.einsum('i,i,j', x, x, y, optimize=['einsum_path', (0, 1), (0, 1)])
array([0, 5], dtype=int16)
>>> np.einsum('i,i,j', x, x, y, optimize=['einsum_path', (0, 2), (0, 1)])
array([0, 5])
@eric-wieser
Copy link
Member

As I think you might have already worked out, this is caused by #10322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants