pub fn concatenate(
arrays: &[impl AsRef<Array>],
axis: impl Into<Option<i32>>,
) -> Result<Array>
Expand description
Concatenate the arrays along the given axis. Returns an error if the shapes are invalid.
§Params
arrays
: The arrays to concatenate.axis
: The axis to concatenate along.
§Example
use mlx_rs::{Array, ops::*};
let x = Array::from_iter(0..4, &[2, 2]);
let y = Array::from_iter(4..8, &[2, 2]);
let result = concatenate(&[x, y], 0);