anyinput: a macro for easier input of ArrayView1<T> #1220
CarlKCarlK
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings,
I've just released anyinput , a crate that makes it easier to write functions that accept any string-, path-,iter-,array-, or 1-d ndarray-like thing. It is just syntactic sugar over the regular Rust syntax, but I hope that in some cases it is easier to remember and read.
Here is an example that shows how to apply ndarray functions such as
mean
to a RustVec<f32>
.Behind the scenes, it is defining a generic type and a lifetime -- syntax you could write yourself but I find hard to remember.
Beta Was this translation helpful? Give feedback.
All reactions