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 invalid-sequence-index with scipy.fft.rfft #8018

Open
Albits opened this issue Jan 3, 2023 · 0 comments · May be fixed by #8103
Open

False positive invalid-sequence-index with scipy.fft.rfft #8018

Albits opened this issue Jan 3, 2023 · 0 comments · May be fixed by #8103
Assignees
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Lib specific 💅 This affect the code from a particular library

Comments

@Albits
Copy link

Albits commented Jan 3, 2023

Bug description

# pylint: disable=missing-module-docstring, missing-function-docstring
# Using scipy.fft.rfft causes the error, removing this line also removes the error
# Seems related to issue #7702

import numpy as np
from scipy.fft import rfft


def some_func():
    arr = np.array([[1, 2, 3], [4, 5, 6]])
    arr_fft = rfft(arr)

    print(arr_fft[:, 0:2])

Command used

pylint false_positive_pylint.py

Pylint output

************* Module false_positive_pylint
false_positive_pylint.py:11:10: E1126: Sequence index is not an int, slice, or instance with __index__ (invalid-sequence-index)

------------------------------------------------------------------
Your code has been rated at 3.75/10 (previous run: 3.75/10, +0.00)

Expected behavior

No error reported

Pylint version

pylint 2.15.9
astroid 2.12.13
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]

OS / Environment

Windows 10 using Powershell

@Albits Albits added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Jan 3, 2023
@Pierre-Sassoulas Pierre-Sassoulas added the Lib specific 💅 This affect the code from a particular library label Jan 3, 2023
@clavedeluna clavedeluna added False Positive 🦟 A message is emitted but nothing is wrong with the code and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jan 23, 2023
@clavedeluna clavedeluna self-assigned this Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code Lib specific 💅 This affect the code from a particular library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants