Skip to content

Commit 086c763

Browse files
authored
Fix bug in Series._flex_method for scalar numpy arrays (issue #59053)Fix bug in Series._flex_method for 0-dimensional numpy arrays (issue #59053)Update series.py
This patch fixes a bug in Series._flex_method when handling 0-dimensional numpy arrays (scalar arrays) that was causing TypeError when len() was called on them. The fix adds a check for 'other.ndim == 0' to treat these arrays as scalars and skip the length check, preventing the error in Series.clip and other operations as discussed in pandas issue #59053.
1 parent 6ad23cf commit 086c763

File tree

1 file changed

+62
-7303
lines changed

1 file changed

+62
-7303
lines changed

0 commit comments

Comments
 (0)