Skip to content

Manage numpy random state with a pyttb specific generator #441

Open
@ntjohnson1

Description

@ntjohnson1

Right now we just have raw calls to np.random. However, if we want to seed things we need to do it globally for numpy which isn't recommended. We should come up with a procedure to have a scoped (or multiple scoped generators) through pyttb.

I can image two approaches (but there is some complexity for user provided methods that generate random numbers).

  1. Create a pyttb singleton wrapper that a user can set then we globally use that.
  2. Plumb through random generator everywhere to avoid the singleton pattern

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