from_matrix¶
-
menpo.math.from_matrix(matrix, template)[source]¶ Create a generator from a matrix given a template
Vectorizableobjects as a template. Thefrom_vectormethod will be used to reconstruct each object.If you want a list, warp the returned value in
list().- Parameters
matrix ((n_items, n_features) ndarray) – A matrix whereby every row represents the data of a vectorizable object.
template (
Vectorizable) – The template object to use to reconstruct each row of the matrix with.
- Returns
vectorizables (generator of
Vectorizable) – Every row of the matrix becomes an element of the list.