I'm trying to find the rust equivalent of this python numpy code doing elementwise comparison of an array.
import numpy as np
np.arange(3) > 1
Here's my rust code:
use ndarray::Array1;
fn main() {
let arr = Array1::<f64>::range(0.0, 3.0, 1.0);
arr > 1.0 // doesn't work.
}
I could do this with a for loop, but I'm looking for the most idiomatic way of doing it.