Skip to content

take_rows

Module: strata.model_selection • Kind: function
Source: strata/model_selection/subsampling.mojo

def take_rows[dtype: DType](
X: Matrix[dtype],
indices: List[Int],
) -> Matrix[dtype]
from strata.model_selection import take_rows

Constructs a new Matrix containing the specified row indices from X.

Returns: Matrix[dtype] — New Matrix containing the selected rows in index order.