You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The matrix multiplication operators @ and @= and their corresponding methods, __matmul__, __rmatmul__, and __imatmul__, that are introduced with Python 3.5 should be supported. See PEP 465.
The text was updated successfully, but these errors were encountered:
Was this fixed? I am using mypy v0.4.5 installed via pip3 (just getting started) and I get errors when using this feature. I haven't even started annotating anything yet.
I run mypy --python-version=3.5 -p mypackage, and get lots of errors like the following:
mypackage/distance.py: note: In function "nearest_neighbors":
mypackage/distance.py:57: error: Parse error before @
And the line referred to is:
r = Xa[:,j] @ Xa / (Xa.shape[0] - 1)
Since I use this feature heavily I get tons of such errors.
Yeah, the default parser doesn't support that. We're moving to a new parser, which you can invoke with --fast-parser. Unfortunately that leads to raise RuntimeError('mypy does not support the MatMult operator') which becomes a crash, so it's just as bad. We'll have to fix this. Thanks for noticing!
The matrix multiplication operators
@
and@=
and their corresponding methods,__matmul__
,__rmatmul__
, and__imatmul__
, that are introduced with Python 3.5 should be supported. See PEP 465.The text was updated successfully, but these errors were encountered: