@@ -78,7 +78,7 @@ def _set_stochastic(self, seed=None):
78
78
seed : int, optional
79
79
Seed for the random number generator.
80
80
"""
81
- self .__rng_generator = np .random .default_rng (seed )
81
+ self .__random_number_generator = np .random .default_rng (seed )
82
82
self .last_rnd_dict = {}
83
83
84
84
# TODO: This code block is too complex. Refactor it.
@@ -181,7 +181,7 @@ def _validate_tuple_length_two(
181
181
# is the standard deviation, and the second item is the distribution
182
182
# function. In this case, the nominal value will be taken from the
183
183
# object passed.
184
- dist_func = get_distribution (input_value [1 ], self .__rng_generator )
184
+ dist_func = get_distribution (input_value [1 ], self .__random_number_generator )
185
185
return (getattr (self .obj , input_name ), input_value [0 ], dist_func )
186
186
else :
187
187
# if second item is an int or float, then it is assumed that the
@@ -191,7 +191,7 @@ def _validate_tuple_length_two(
191
191
return (
192
192
input_value [0 ],
193
193
input_value [1 ],
194
- get_distribution ("normal" , self .__rng_generator ),
194
+ get_distribution ("normal" , self .__random_number_generator ),
195
195
)
196
196
197
197
def _validate_tuple_length_three (
@@ -228,7 +228,7 @@ def _validate_tuple_length_three(
228
228
f"'{ input_name } ': Third item of tuple must be a string containing the "
229
229
"name of a valid numpy.random distribution function."
230
230
)
231
- dist_func = get_distribution (input_value [2 ], self .__rng_generator )
231
+ dist_func = get_distribution (input_value [2 ], self .__random_number_generator )
232
232
return (input_value [0 ], input_value [1 ], dist_func )
233
233
234
234
def _validate_list (
@@ -287,7 +287,7 @@ def _validate_scalar(
287
287
return (
288
288
getattr (self .obj , input_name ),
289
289
input_value ,
290
- get_distribution ("normal" , self .__rng_generator ),
290
+ get_distribution ("normal" , self .__random_number_generator ),
291
291
)
292
292
293
293
def _validate_factors (self , input_name , input_value ):
@@ -355,14 +355,16 @@ def _validate_tuple_factor(self, input_name, factor_tuple):
355
355
return (
356
356
factor_tuple [0 ],
357
357
factor_tuple [1 ],
358
- get_distribution ("normal" , self .__rng_generator ),
358
+ get_distribution ("normal" , self .__random_number_generator ),
359
359
)
360
360
elif len (factor_tuple ) == 3 :
361
361
assert isinstance (factor_tuple [2 ], str ), (
362
362
f"'{ input_name } `: Third item of tuple must be a string containing "
363
363
"the name of a valid numpy.random distribution function"
364
364
)
365
- dist_func = get_distribution (factor_tuple [2 ], self .__rng_generator )
365
+ dist_func = get_distribution (
366
+ factor_tuple [2 ], self .__random_number_generator
367
+ )
366
368
return (factor_tuple [0 ], factor_tuple [1 ], dist_func )
367
369
368
370
def _validate_list_factor (self , input_name , factor_list ):
0 commit comments