Skip to content

Better descriptions for random initializations #45

@mstimberg

Description

@mstimberg

With the polishing branch, intializations that refer to rand() or randn() already look a bit nicer. But I think we could use this as a first example of automatic annotation with additional analysis.
If an expression only contains a single rand() call, we can use sympy's substitution mechanism and substitute it once with 0 and once with 1, and then use this to display the lower and upper bounds. So if you have an initialization like:

v = El + (V_th - El)*rand()

This would currently be displayed as:
image

but we could further annotate this with something like
image

We could probably do something fancy with sympy as well to get the mean and variance of a normal distribution if the expression uses randn().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions