Skip to content

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

Open
@inducer

Description

@inducer

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲Lib specific 💅This affect the code from a particular libraryNeeds astroid Brain 🧠Needs a brain tip in astroid (then an astroid upgrade)Needs astroid updateNeeds an astroid update (probably a release too) before being mergable

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions