Handbook
Glossary
check-hstack-shape ( seq -- seq )
Vocabulary
tensors
.
private
Inputs
seq
an
object
Outputs
seq
an
object
Definition
USING:
accessors
kernel
sequences
tensors
;
IN:
tensors.private
::
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
;