Skip to content

Commit

Permalink
Merge pull request #81 from pmk21/neg-reduce
Browse files Browse the repository at this point in the history
Support for negative reduce
  • Loading branch information
benkrikler authored Oct 6, 2019
2 parents 9357133 + 05fe684 commit e8af6c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fast_carpenter/define/reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, index, fill_missing, force_float=True):
self.dtype = float

def __call__(self, array):
mask = array.counts > self.index
mask = array.counts > abs(self.index)
output = np.full(len(array), self.fill_missing, dtype=self.dtype)
output[mask] = array[mask, self.index]
return output
Expand Down

0 comments on commit e8af6c2

Please sign in to comment.