Skip to content

TYP: ndarray.fill() takes no keyword arguments #29608

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

Merged
merged 1 commit into from
Aug 21, 2025

Conversation

hunterhogan
Copy link
Contributor

(.venv) C:\apps\mapFolding>py
Python 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> aa = numpy.zeros((4,3))
>>> aa
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]])
>>> aa.fill(value=9)
Traceback (most recent call last):
  File "<python-input-3>", line 1, in <module>
    aa.fill(value=9)
    ~~~~~~~^^^^^^^^^
TypeError: ndarray.fill() takes no keyword arguments
>>> aa
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]])
>>> aa.fill(9)
>>> aa
array([[9., 9., 9.],
       [9., 9., 9.],
       [9., 9., 9.],
       [9., 9., 9.]])
>>> 

```python
(.venv) C:\apps\mapFolding>py
Python 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> aa = numpy.zeros((4,3))
>>> aa
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]])
>>> aa.fill(value=9)
Traceback (most recent call last):
  File "<python-input-3>", line 1, in <module>
    aa.fill(value=9)
    ~~~~~~~^^^^^^^^^
TypeError: ndarray.fill() takes no keyword arguments
>>> aa
array([[0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.],
       [0., 0., 0.]])
>>> aa.fill(9)
>>> aa
array([[9., 9., 9.],
       [9., 9., 9.],
       [9., 9., 9.],
       [9., 9., 9.]])
>>> 
```
Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@jorenham jorenham added the 09 - Backport-Candidate PRs tagged should be backported label Aug 21, 2025
@jorenham jorenham merged commit 5f6d750 into numpy:main Aug 21, 2025
80 checks passed
@jorenham
Copy link
Member

Thanks @hunterhogan

@hunterhogan
Copy link
Contributor Author

Thank you for the "Thanks"!

@hunterhogan hunterhogan deleted the patch-1 branch August 22, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
09 - Backport-Candidate PRs tagged should be backported 41 - Static typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants