Skip to main content

replace_elements

Function replace_elements 

Source
fn replace_elements(
    target: &Vector,
    indices: &[Option<i64>],
    replacement: &Vector,
    max_idx: usize,
) -> Vector
Expand description

Replace elements in a vector at 1-based indices, preserving type when possible. If the replacement value’s type differs, coerces both to the common type.