Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TYP: ndarray.fill() takes no keyword arguments
```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.]])
>>> 
```
  • Loading branch information
hunterhogan authored and charris committed Sep 5, 2025
commit f3dc3b832925c97a9e2aab59e7c6b8bde6728cd2
2 changes: 1 addition & 1 deletion numpy/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeT_co, _DTypeT_co]):
@strides.setter
def strides(self, value: _ShapeLike) -> None: ...
def byteswap(self, inplace: builtins.bool = ...) -> Self: ...
def fill(self, value: Any) -> None: ...
def fill(self, value: Any, /) -> None: ...
@property
def flat(self) -> flatiter[Self]: ...

Expand Down
Loading