We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea53111 commit 9291510Copy full SHA for 9291510
src/MeasureBase.jl
@@ -33,6 +33,7 @@ import IfElse: ifelse
33
export logdensity_def
34
export basemeasure
35
export basekernel
36
+export productmeasure
37
38
"""
39
inssupport(m, x)
src/combinators/product.jl
@@ -157,7 +157,11 @@ end
157
158
marginals(μ::ProductMeasure) = μ.marginals
159
160
-testvalue(d::AbstractProductMeasure) = map(testvalue, marginals(d))
+# TODO: Better `map` support in MappedArrays
161
+_map(f, args...) = map(f, args...)
162
+_map(f, x::MappedArrays.ReadonlyMappedArray) = mappedarray(f ∘ x.f, x.data)
163
+
164
+testvalue(d::AbstractProductMeasure) = _map(testvalue, marginals(d))
165
166
export ⊗
167
0 commit comments