Skip to content

Commit

Permalink
Avoid test memory allocation with an iterator
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
marcusps and devmotion authored Dec 17, 2024
1 parent 70763cc commit a422fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/univariate/discrete/binomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
@test median(Binomial(65,3//10)) == 19
@test median(Binomial(85,3//10)) == 25

@test all([median(Binomial(7,p))==quantile(Binomial(7,p),1//2) for p in range(0,1,length=11)])
@test all(median(Binomial(7, p)) == quantile(Binomial(7, p), 1//2) for p in 0:0.1:1)

# Test mode
@test Distributions.mode(Binomial(100, 0.4)) == 40
Expand Down

0 comments on commit a422fdb

Please sign in to comment.