Skip to content

Random seed initialisation #125

@jnahlers

Description

@jnahlers

Just a heads up - I was trying to get reproducible 2D foams by setting the seed for generation. The code uses both random and numpy.random, so to get reproducible objects I had to set both seeds:

import numpy as np
np.random.seed(42)
import random
random.seed(42)

I'd recommend only uses one random library, or letting the user set a seed parameter in the foam2d/foam3d functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions