Hi,

Firstly i’m new to rust and come from the python world. There is a good chance my question is unrelated to nalgebra but rather a miss-understanding of the language.

here’s my problem:

I want to iterate over the rows of a matrix and pass the returned slice to a function, however I couldn’t figure out what type annotation to use in the function signature. I ended up just doing what the compiler told me to do… however my understanding is lacking and I’m sure there is a better way.

This is what I came up with:

```
extern crate nalgebra as na;
use na::{Matrix, U1, U2, U100, ArrayStorage, SliceStorage};
use rand::Rng;
fn real_fn(X: Matrix<f64, U1, U2, SliceStorage<f64, U1, U2, U1, U100>>)
-> na::Matrix<f64, na::U1, na::U1, na::ArrayStorage<f64, na::U1, na::U1>> {
2.0 * X.column(0) - 3.4 * X.column(1)
}
fn main() {
type Matrix2x100 = Matrix<f64, U100, U2, ArrayStorage<f64, U100, U2, >>;
let dist = rand::distributions::Normal::new(20.0, 1.5);
let X = Matrix2x100::from_iterator(rand::thread_rng().sample_iter(&dist
));
for i in 0..100 {
real_fn(X.row(i));
}
}
```