Occupancy#
Random occupancy generation.
- get_random_occupancy_from_counts(ensemble, counts)[source]#
Generate random occupancy from species counts.
- Parameters:
ensemble (Ensemble) – An
Ensemble
object to generate occupancy in.counts (1D arrayLike) – Species composition in “counts” format. See
smol.moca.composition
.
- Returns:
An encoded occupancy array.
- Return type:
np.ndarray