Skip to content

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

Closed
pylint-dev/astroid
#831
@mattwala

Description

@mattwala

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions