-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
TYP: flatiter is missing __setitem__ #20915
Copy link
Copy link
Closed
Milestone
Description
Describe the issue:
The typing information for __flatiter__ does not define __setitem__ and so attempts to assign fail.
Reproduce the code example:
import numpy as np
a = np.empty(10)
a.flat[[0,2,4,6,8]] = np.nanError message:
`Unsupported target for indexed assignment ("flatiter[ndarray[Any, dtype[floating[_64Bit]]]]")`NumPy/Python version information:
1.22.1 3.9.7 (default, Sep 16 2021, 16:59:28) [MSC v.1916 64 bit (AMD64)]
Reactions are currently unavailable