Skip to content

Commit

Permalink
Fix case where ci is Nont
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Mar 13, 2015
1 parent f276e0f commit 268d209
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,11 +1134,12 @@ def estimate_statistic(self, estimator, ci, n_boot):
statistic.append(estimator(stat_data))

# Get a confidence interval for this estimate
if stat_data.size < 2:
confint.append([np.nan, np.nan])
continue

if ci is not None:

if stat_data.size < 2:
confint.append([np.nan, np.nan])
continue

boots = bootstrap(stat_data, func=estimator,
n_boot=n_boot,
units=unit_data)
Expand Down Expand Up @@ -1174,11 +1175,12 @@ def estimate_statistic(self, estimator, ci, n_boot):
statistic[i].append(estimator(stat_data))

# Get a confidence interval for this estimate
if stat_data.size < 2:
confint[i].append([np.nan, np.nan])
continue

if ci is not None:

if stat_data.size < 2:
confint[i].append([np.nan, np.nan])
continue

boots = bootstrap(stat_data, func=estimator,
n_boot=n_boot,
units=unit_data)
Expand Down

0 comments on commit 268d209

Please sign in to comment.