Commit 55b6fde1 authored by Moyuan CHEN's avatar Moyuan CHEN
Browse files


parent dbcd29f0
......@@ -177,5 +177,3 @@ def get_species_from_distribution(N, species_distribution, key=None):
additions = np.zeros(N, dtype=np.int32).at[N-p.shape[0]:].set(random.choice(key, species_distribution.shape[0], (N-particle_index,), False, p=p))
return np.sort(np.where(np.arange(N)>=particle_index, additions, species))
get_species_from_distribution = jit(get_species_from_distribution, static_argnums=(0,))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment