Skip to content

Commit 17f1e57

Browse files
Fix cdf and univariate affine broadcasting (#219)
* Fix cdf broadcasting * Implement broadcasting * Fix affine rules and cdf * Version bump * Fix broadcasting * Update affine.jl * Update affine.jl * Update runtests.jl
1 parent 0bf28e2 commit 17f1e57

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MeasureTheory"
22
uuid = "eadaa1a4-d27c-401d-8699-e962e1bbc33b"
33
authors = ["Chad Scherrer <[email protected]> and contributors"]
4-
version = "0.16.5"
4+
version = "0.16.6"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"

test/runtests.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,10 @@ end
574574
f = AffineTransform((μ = 3,))
575575
@test f(inverse(f)(1)) == 1
576576
@test inverse(f)(f(1)) == 1
577+
578+
f = AffineTransform((σ = [1 2; 2 1],))
579+
@test f(inverse(f)([1 2; 2 1])) == [1 2; 2 1]
580+
@test inverse(f)(f([1 2; 2 1])) == [1 2; 2 1]
577581
end
578582

579583
@testset "Affine" begin
@@ -645,3 +649,8 @@ end
645649

646650
@test logdensityof(d, x) isa Real
647651
end
652+
653+
@testset "Distributions.jl cdf" begin
654+
@test cdf(Normal(0, 1), 0) == 0.5
655+
@test cdf.((Normal(0, 1),), [0, 0]) == [0.5, 0.5]
656+
end

0 commit comments

Comments
 (0)