Skip to content

Commit

Permalink
BUG: Fix mapclassify #88
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcsauer committed Oct 25, 2020
1 parent 6cf31ee commit 7aad6fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mapclassify/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,11 @@ def _summary(self):
self.gadf = self.get_gadf()

def _classify(self):
self._set_bins()
self.yb, self.counts = bin1d(self.y, self.bins)
if min(self.y) == max(self.y):
raise ValueError("Minimum and maximum of input data are equal, cannot create bins.")
else:
self._set_bins()
self.yb, self.counts = bin1d(self.y, self.bins)

def _update(self, data, *args, **kwargs):
"""
Expand Down

0 comments on commit 7aad6fc

Please sign in to comment.