skbio.embedding.embed_vec_to_numpy#
- skbio.embedding.embed_vec_to_numpy(vectors, validate=True)[source]#
Convert an iterable of EmbeddingVector objects to a NumPy array.
- Parameters:
- vectorsiterable of EmbeddingVector objects
An iterable of EmbeddingVector objects, or objects that subclass EmbeddingVector.
- validatebool, optional
If
True
, validate that all vectors have the same length and are valid types.
- Returns:
- ndarray of shape (n_objects, n_features)
A NumPy array where n_features corresponds to the dimensionality of the latent space.
- Raises:
- ValueError
If the vectors do not have the same length.