Skip to content

chaospy.Distribution.sample : Issue with seed argument in conda install #435

@mrudd210

Description

@mrudd210

Describe the bug
I get an error when I run the chaospy.Distribution.sample() function and specific a seed, if I install chaospy using the conda install. It does not recognized the "seed" argument. I reinstalled chaopy using the pip install and the error when away.

To Reproduce
t_shell = chaospy.Uniform(1.27, 2.54) #mm
rho= chaospy.Uniform(0, 800) #mm
alpha= chaospy.Uniform(10, 25) #degrees

uniform_joint_distribution = chaospy.J(alpha,rho, t_shell)
count = 20

analyses_var = uniform_joint_distribution.sample(count, rule="latin_hypercube", seed=1234)

Expected behavior

The analyses_var array should be created with 3 rows and 20 columns with values based on the latin hypercube sampling technique and the joint distribution of t_shell, rho, and alpha.

Desktop (please complete the following information):

  • OS: Windows 11
  • Python version: 3.12
  • Chaospy version 4.3.17 for pip install. This version does NOT have an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions