Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; produces a multidimensional tensor based on dimensions supplied
- (defn tens-fill [x & dims]
- (if (empty? dims) x
- (loop [acc [] k (first dims)]
- (if (= 0 k)
- acc
- (recur (conj acc (apply tens-fill x (rest dims)) (- k 1)))))))
Advertisement
Add Comment
Please, Sign In to add comment