Skip to content

.max of FRDRV does not work properly #6

@pelegm

Description

@pelegm

For example,

In [1]: import drv.real

In [2]: ps = [1, 1, 2, 3, 5, 0, 13, 21, 34, 0]

In [3]: fp = drv.pspace.FDPSpace(ps)

In [4]: fr = drv.real.FRDRV('fr', fp, lambda x: x ** 2)

In [5]: fr.max
Out[5]: 81

In [6]: fr.xs
Out[6]: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

In [7]: fr.ps
Out[7]: [0.0125, 0.0125, 0.025, 0.0375, 0.0625, 0.0, 0.1625, 0.2625, 0.425, 0.0]

The maximum of the random variable should clearly be 64.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions