A shape vector entry can be a number of things. We want to be precise with handling them and abstract that handling so new things have a clear path.
A shape vector entry can be a number of things. We want to be precise with handling them and abstract that handling so new things have a clear path.
(->2d shape)
Given dimensions, return new dimensions with the lowest (fastest-changing) dimension unchanged and the rest of the dimensions multiplied into the higher dimension.
Given dimensions, return new dimensions with the lowest (fastest-changing) dimension unchanged and the rest of the dimensions multiplied into the higher dimension.
(->batch shape)
Given dimensions, return new dimensions with the lowest (fastest-changing) dimension unchanged and the rest of the dimensions multiplied into the higher dimension.
Given dimensions, return new dimensions with the lowest (fastest-changing) dimension unchanged and the rest of the dimensions multiplied into the higher dimension.
(classified-sequence->count {:keys [type min-item max-item sequence]})
(classified-sequence->elem-idx {:keys [type min-item max-item sequence] :as dim}
shape-idx)
(classified-sequence->sequence {:keys [min-item max-item type sequence]})
(combine-classified-sequences source-sequence select-sequence)
Room for optimization here. But simplest way is easiest to get correct.
Room for optimization here. But simplest way is easiest to get correct.
(ecount shape)
Return the element count indicated by the dimension map
Return the element count indicated by the dimension map
(shape-entry->count shape-entry)
Return a vector of counts of each shape.
Return a vector of counts of each shape.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close