Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
maratik123 committed Jun 15, 2024
1 parent c55ac56 commit 7aadc50
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/distributions/reusable_weighted_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ impl<X: SampleUniform + PartialOrd + Default> CumulativeWeightsWrapper<X> {
}
self.cumulative_weights.reserve(iter.size_hint().0);
for w in iter {
// Note that `!(w >= x)` is not equivalent to `w < x` for partially
// ordered types due to NaNs which are equal to nothing.
if matches!(w.borrow().partial_cmp(&zero), None | Some(Ordering::Less)) {
self.cumulative_weights.clear();
return Err(WeightError::InvalidWeight);
Expand Down

0 comments on commit 7aadc50

Please sign in to comment.