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

Add missing shape parameter to numpy methods #1450

Merged
merged 9 commits into from
Mar 9, 2022
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Release date: TBA

Closes #1410

* Fix false positive for ``shape`` parameter of ``numpy.zeros_like`` method.

Closes PyCQA/pylint#5871


What's New in astroid 2.10.1?
=============================
Expand Down
2 changes: 1 addition & 1 deletion astroid/brain/brain_numpy_core_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def numpy_core_numeric_transform():
"""
# different functions defined in numeric.py
import numpy
def zeros_like(a, dtype=None, order='K', subok=True): return numpy.ndarray((0, 0))
def zeros_like(a, dtype=None, order='K', subok=True, shape=0): return numpy.ndarray((0, 0))
def ones_like(a, dtype=None, order='K', subok=True): return numpy.ndarray((0, 0))
def full_like(a, fill_value, dtype=None, order='K', subok=True): return numpy.ndarray((0, 0))
"""
Expand Down