You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Numpy Typing does not recognize a deque as a valid input for np.max #24265
The issue here stems from deque failing to properly implement the interface as specified by the Sequence abstract base class (which we rely on in our typing definition of array-like), the former lacking support for slice-based indexing. Loosening the __getitem__ annotations down below via removal of the slice-based overload might be worth a shot here:
Activity
BvB93 commentedon Jul 26, 2023
The issue here stems from
dequefailing to properly implement the interface as specified by theSequenceabstract base class (which we rely on in our typing definition of array-like), the former lacking support forslice-based indexing. Loosening the__getitem__annotations down below via removal of theslice-based overload might be worth a shot here:numpy/numpy/_typing/_nested_sequence.py
Lines 65 to 72 in 7e806a1