Skip to content

Commit cad52aa

Browse files
Add user doc for the macro
1 parent fcc2da6 commit cad52aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

einops-macros/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
mod einops;
22

3+
/// Macro to perform tensor transformations using simple expressions
4+
///
5+
/// # Example
6+
///
7+
/// ```no_run
8+
/// let output = einops!("h w c -> c h w", &input);
9+
/// ```
310
#[proc_macro]
411
pub fn einops(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
512
einops::einops(input.into())

0 commit comments

Comments
 (0)