Skip to content

Commit 3ee8a40

Browse files
committed
MNT: only try to fake numpy's behavior if we have more than 1 input
1 parent 048f550 commit 3ee8a40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6655,7 +6655,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
66556655
# If bins are not specified either explicitly or via range,
66566656
# we need to figure out the range required for all datasets,
66576657
# and supply that to np.histogram.
6658-
if not bins_array_given and not input_empty:
6658+
if not bins_array_given and not input_empty and len(x) > 1:
66596659
if weights is not None:
66606660
_w = np.concatenate(w)
66616661
else:

0 commit comments

Comments
 (0)