Skip to content

insupport for reshaped univariate distributions returns 0-dim BitArray rather than Bool #2026

Description

@penelopeysm

Another edge case with reshaped distributions:

julia> insupport(reshape(Normal(), 1), [0.5])
0-dimensional BitArray{0}:
1

This comes from here, as size(d.dist) == () and hence reshape(x, size(d.dist)) is a 0-dim array:

function insupport(d::ReshapedDistribution{N}, x::AbstractArray{<:Real,N}) where {N}
return size(d) == size(x) && insupport(d.dist, reshape(x, size(d.dist)))
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions