org.apache.clojure-mxnet.util
->int-option
(->int-option v)
apply-scala-fn
(apply-scala-fn f args)
buffer->vec
(buffer->vec b)
coerce-param
(coerce-param param targets)
coerce-return
(coerce-return return-val)
coerce-return-recursive
(coerce-return-recursive return-val)
convert-by-shape
(convert-by-shape param)
convert-io-map
(convert-io-map param)
convert-map
(convert-map param)
convert-shape-map
(convert-shape-map param)
convert-symbol-map
(convert-symbol-map param)
convert-tuple
(convert-tuple param)
convert-vector
(convert-vector param)
empty-indexed-seq
(empty-indexed-seq)
empty-list-map
(empty-list-map)
io-convert-by-param-name
(io-convert-by-param-name param)
keyword->snake-case
(keyword->snake-case kw)
Transforms a keyword `kw` into a snake-case string.
`kw`: keyword
returns: string
Ex:
(keyword->snake-case :foo-bar) ;"foo_bar"
(keyword->snake-case :foo) ;"foo"
map->scala-tuple-seq
(map->scala-tuple-seq map-or-tuple-seq)
* Convert a map to a scala-Seq of scala-Tuple.
* Should also work if a seq of seq of 2 things passed.
* Otherwise passed through unchanged.
nd-seq-shape
(nd-seq-shape nd-seq)
Computes the shape of a n-dimensional sequential structure
nil-or-coerce-param
(nil-or-coerce-param param targets)
option->value
(option->value opt)
scala-fn
macro
(scala-fn f)
Creates a scala fn from an anonymous clojure fn of the form (fn [x] body)
scala-iterator->seq
(scala-iterator->seq x)
scala-map->map
(scala-map->map m)
scala-vector->vec
(scala-vector->vec x)
to-array-nd
(to-array-nd nd-seq)
Converts any N-D sequential structure to an array
with the same dimensions.
translate-keyword-shape
(translate-keyword-shape [k v])
tuple-convert-by-param-name
(tuple-convert-by-param-name param)
validate!
(validate! spec value error-msg)
vec->indexed-seq
(vec->indexed-seq x)