Skip to content

Do not set global RNG of scipy.skewnorm #337

@dachengx

Description

@dachengx

skewnorm.random_state = self.rng

This line of code sets a global RNG of scipy.skewnorm. This might not be an issue when single-thread processing, but it might be dangerous when cross-thread because we can not predict the execution order of threads.

The safe code will be skewnorm.rvs(..., random_state=rng).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions