Handbook
Glossary
hstack-guide ( seq -- guide )
Vocabulary
tensors
.
private
Inputs
seq
an
object
Outputs
guide
an
object
Definition
USING:
accessors
arrays
kernel
math
ranges
sequences
;
IN:
tensors.private
::
hstack-guide
( seq -- guide )
seq
[
shape>>
last
]
map
:>
last-dims 0 0 last-dims
sum
[0..b)
[
drop
:>
old-t-ind
:>
last-dims-i last-dims-i last-dims
nth
old-t-ind
-
[
last-dims-i 1
+
0
]
[
drop
last-dims-i old-t-ind
]
if-zero
2dup
[
dup
last-dims
nth
]
dip
3array
[
1
+
]
dip
]
map
nip
nip
;