check-hstack-shape ( seq -- seq )


Vocabulary
tensors.private

Inputs
seqan object


Outputs
seqan object


Definition


:: check-hstack-shape ( seq -- seq )
seq first { } >tensor dup :> empty-tensor like
shape>> dup :> first-shape but-last :> but-last-shape seq [
empty-tensor like dup shape>> but-last but-last-shape =
[ shape>> first-shape swap shape-mismatch-error ] unless
] map ;