Skip to content

SampleSet Functions seem to show wrong results sometimes #1036

@danwahl

Description

@danwahl

Description:

Multiplying a SampleSet by 1 results in a different distribution.

Steps to reproduce:

s = SampleSet.fromDist(1 to 2)

f(t) = s

g(t) = SampleSet.map(s, {|x| x * 1})

h(t) = s * 1

Expected behavior:

I'd expect f(t), g(t), and h(t) to be equivalent if SampleSets are "stored as a list of numbers" (as per documentation).

What I got instead:

f(t) and g(t) produce the same (correct) result, but h(t) does not:

image

Note that this only seems to happen in functions (e.g. i = s is the same as j = s * 1).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions