Skip to content

Commit 9291510

Browse files
authored
Dev (#57)
1 parent ea53111 commit 9291510

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/MeasureBase.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import IfElse: ifelse
3333
export logdensity_def
3434
export basemeasure
3535
export basekernel
36+
export productmeasure
3637

3738
"""
3839
inssupport(m, x)

src/combinators/product.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ end
157157

158158
marginals::ProductMeasure) = μ.marginals
159159

160-
testvalue(d::AbstractProductMeasure) = map(testvalue, marginals(d))
160+
# 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))
161165

162166
export
163167

0 commit comments

Comments
 (0)