-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeLib specific 💅This affect the code from a particular libraryThis affect the code from a particular libraryNeeds astroid Brain 🧠Needs a brain tip in astroid (then an astroid upgrade)Needs a brain tip in astroid (then an astroid upgrade)
Description
Bug description
from numpy import zeros, where, newaxis
omega = zeros(10)
w_1 = zeros((10, 5))
w_2 = where(omega < 1., 0., 1.)
result = w_1 * w_2[:, newaxis]
Command used
python -m pylint test.py
Pylint output
E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)
Expected behavior
No error reported
Pylint version
pylint 3.3.1
astroid 3.3.5
Python 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0]
Additional dependencies
numpy==1.24.4
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeLib specific 💅This affect the code from a particular libraryThis affect the code from a particular libraryNeeds astroid Brain 🧠Needs a brain tip in astroid (then an astroid upgrade)Needs a brain tip in astroid (then an astroid upgrade)