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

[Regression] Misidentified return type of numpy.mgrid #9989

Open
inducer opened this issue Sep 30, 2024 · 0 comments
Open

[Regression] Misidentified return type of numpy.mgrid #9989

inducer opened this issue Sep 30, 2024 · 0 comments
Labels
Bug 🪲 Lib specific 💅 This affect the code from a particular library Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs astroid update Needs an astroid update (probably a release too) before being mergable

Comments

@inducer
Copy link

inducer commented Sep 30, 2024

Bug description

import numpy as np

g = np.mgrid[1:2:3j, 3:4:5j]
g.shape

Configuration

No response

Command used

pylint mgrid.py

Pylint output

x.py:1:0: C0114: Missing module docstring (missing-module-docstring)
x.py:4:0: W0104: Statement seems to have no effect (pointless-statement)
x.py:4:0: E1101: Instance of 'tuple' has no 'shape' member (no-member)

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

Expected behavior

The no-member warning seems suprious. numpy.mgrid returns an ndarray: https://numpy.org/doc/stable/reference/generated/numpy.mgrid.html.

Pylint version

pylint 3.3.1

OS / Environment

Debian, distro Python 3.12

Additional dependencies

numpy 2.1.1 (OK with numpy 2.1.0)
@inducer inducer added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Sep 30, 2024
inducer added a commit to inducer/sumpy that referenced this issue Sep 30, 2024
inducer added a commit to inducer/sumpy that referenced this issue Sep 30, 2024
@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 Needs astroid update Needs an astroid update (probably a release too) before being mergable Lib specific 💅 This affect the code from a particular library Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Lib specific 💅 This affect the code from a particular library Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) Needs astroid update Needs an astroid update (probably a release too) before being mergable
Projects
None yet
Development

No branches or pull requests

2 participants