Skip to content

Review allocation of arrays random numbers #1319

@paskino

Description

@paskino

Numpy changed the way to generate a random array.

SIRF/src/common/SIRF.py

Lines 173 to 183 in 1d7b1ba

if value in ['random', 'random_int']:
out = self.get_uniform_copy()
shape = out.shape
seed = kwargs.get('seed', None)
if seed is not None:
numpy.random.seed(seed)
if value == 'random':
out.fill(numpy.random.random_sample(shape))
elif value == 'random_int':
max_value = kwargs.get('max_value', 100)
out.fill(numpy.random.randint(max_value,size=shape))

Metadata

Metadata

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