cbx.utils.particle_init.init_particles#
- class cbx.utils.particle_init.init_particles(shape=(1, 1, 1), x_min=-1.0, x_max=1.0, delta=1.0, method='uniform')[source]#
Bases:
Initialize particles
- Parameters:
shape (tuple, optional) – Shape of the particle array
(M, N, d). The default is(1, 1, 1).x_min (float, optional) – Lower bound for the uniform distribution. The default is -1.0.
x_max (float, optional) – Upper bound for the uniform distribution. The default is 1.0.
delta (float, optional) – Standard deviation for the normal distribution. The default is 1.0.
method (str, optional) – Method for initializing the particles. The default is
"uniform". Possible values:"uniform","normal".
- Returns:
x – Array of particles of shape
(M, N, d).- Return type:
numpy.ndarray