Skip to content

ValueError: array must not contain infs or NaNs #68

@tsryo

Description

@tsryo

pis[i] /= resp_i.sum(axis=0)

Seems to happen for me intermittently, depending on what random state I start with. Happens when fitting a one-step model with full gaussian measurement model and binary_nan structural. When occurring it seems that a certain element in pis[i] (and its corresponding elemnt from resp_i ) , are equal to zero, causing 0/0 -> nan.
Current workaround I used was setting pis[i] with nan_to_num, where all nans are changed to zeroes.
Not sure if this is valid to do, or just treating the symptom instead of the root cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions