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

False positive: numpy ndarray .T does not support item assignment #3932

Closed
anuppari opened this issue Nov 1, 2020 · 1 comment
Closed

False positive: numpy ndarray .T does not support item assignment #3932

anuppari opened this issue Nov 1, 2020 · 1 comment

Comments

@anuppari
Copy link

anuppari commented Nov 1, 2020

Code to reproduce:

import numpy as np

a = np.array([[1,2,3],[4,5,6]])
print(a)

a.T[1,1] = 10
print(a)

Current behavior

Pylint gives

E1137: 'a.T' does not support item assignment (unsupported-assignment-operation)

but the program runs fine

Expected behavior

No pylint error.

pylint --version output

pylint 2.6.0
astroid 2.4.2
Python 3.8.5 (default, Aug 6 2020, 16:46:05)
[GCC 7.5.0]

@hippo91
Copy link
Contributor

hippo91 commented Nov 17, 2020

@anuppari thanks for the report. It is the same issue as #3387 so i close this one.

@hippo91 hippo91 closed this as completed Nov 17, 2020
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

No branches or pull requests

2 participants