use crate::shapes::Shape;
use crate::shapes::idx::StaticCursor;
use typenum::U2;
#[diagnostic::on_unimplemented(
message = "Cannot stack shape `{Self}` along axis `{Axis}`",
label = "Invalid axis for stacking",
note = "Stacking requires the axis to be <= the rank of the tensor"
)]
pub trait StackShape<Axis> {
type Output: Shape;
}
impl<S: Shape, Axis> StackShape<Axis> for S
where
Axis: StaticCursor,
S: crate::shapes::InsertAt<Axis, U2>,
{
type Output = <S as crate::shapes::InsertAt<Axis, U2>>::Output;
}