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 not-an-iterable for transpose of numpy array #3387

Closed
mattwala opened this issue Feb 6, 2020 · 1 comment · Fixed by pylint-dev/astroid#831
Closed

False positive not-an-iterable for transpose of numpy array #3387

mattwala opened this issue Feb 6, 2020 · 1 comment · Fixed by pylint-dev/astroid#831
Assignees
Labels
Astroid Related to astroid Bug 🪲 Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)

Comments

@mattwala
Copy link

mattwala commented Feb 6, 2020

Steps to reproduce

import numpy as np
for _ in np.array([1]).T:
    pass

Current behavior

$ pylint -E test.py
************* Module abc
test.py:2:9: E1133: Non-iterable value np.array([1]).T is used in an iterating context (not-an-iterable)

Expected behavior

No error should be reported

pylint --version output

pylint 2.4.4
astroid 2.3.3
Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 14:38:56) 
[Clang 4.0.1 (tags/RELEASE_401/final)]

cc: @inducer

@PCManticore PCManticore added Astroid Related to astroid Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Bug 🪲 labels Feb 10, 2020
@PCManticore
Copy link
Contributor

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Astroid Related to astroid Bug 🪲 Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants