Skip to main content
`Ctrl`+`K`

# skbio.embedding.embed_vec_to_numpy

skbio.embedding.embed_vec_to_numpy(vectors, validate=True)

  Convert an iterable of EmbeddingVector objects to a NumPy array.

  Parameters:
    vectors iterable of EmbeddingVector objects

      An iterable of EmbeddingVector objects, or objects that subclass EmbeddingVector.

    validate bool, 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.