Skip to content

Commit 2b96919

Browse files
authored
Allow list with len 1 to be broadcast
1 parent cc0fdb5 commit 2b96919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def __init__(self, data=None, index=None, dtype=None, name=None,
239239
# a scalar numpy array is list-like but doesn't
240240
# have a proper length
241241
try:
242-
if len(data) > 1 and len(index) != len(data):
242+
if len(data) != 1 and len(index) != len(data):
243243
raise ValueError(
244244
'Length of passed values is {val}, '
245245
'index implies {ind}'

0 commit comments

Comments
 (0)