Skip to content

Commit

Permalink
Fix bugs in bin_chi2.
Browse files Browse the repository at this point in the history
  • Loading branch information
l0o0 committed Jan 14, 2019
1 parent 79c17a3 commit 803f54b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rosaceae/bins.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ def bin_chi2(xarray, y, bins, min_sample=0.01, na_omit=True, verbose=False):
# reformat numeric groups
for _i, g in enumerate(groups):
if np.isinf(g[0]):
g[_i] = '(-inf:%s]' % g[1]
groups[_i] = '(-inf:%s]' % g[1]
elif np.isinf(g[1]):
g[_i] = '(%s:inf)' % g[0]
groups[_i] = '(%s:inf)' % g[0]
else:
g[_i] = '(%s:%s]' % (g[0], g[1])
groups[_i] = '(%s:%s]' % (g[0], g[1])

return groups

Expand Down

0 comments on commit 803f54b

Please sign in to comment.