Skip to content

take_elements

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

def take_elements[dtype: DType](
y: List[Scalar[dtype]],
indices: List[Int],
) -> List[Scalar[dtype]]
from strata.model_selection import take_elements

Constructs a new List containing the specified element indices from y.

Returns: List[Scalar[dtype]] — New List containing the selected elements in index order.