You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by cm...@apache.org on 2018/08/31 18:10:36 UTC
[incubator-mxnet] 01/01: remove let
This is an automated email from the ASF dual-hosted git repository.
cmeier pushed a commit to branch update-data-desc-clojure
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
commit a53f8694382a9fa2f63cc2c41118458118730bfb
Author: gigasquid <cm...@gigasquidsoftware.com>
AuthorDate: Fri Aug 31 14:10:07 2018 -0400
remove let
---
.../src/org/apache/clojure_mxnet/io.clj | 35 +++++++++++-----------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/contrib/clojure-package/src/org/apache/clojure_mxnet/io.clj b/contrib/clojure-package/src/org/apache/clojure_mxnet/io.clj
index 3463545..a2b6399 100644
--- a/contrib/clojure-package/src/org/apache/clojure_mxnet/io.clj
+++ b/contrib/clojure-package/src/org/apache/clojure_mxnet/io.clj
@@ -245,24 +245,23 @@
last-batch-handle "pad"
data-name "data"
label-name "label"}}]
- (let [specify-data-desc? (map? data)]
- (if specify-data-desc?
- (new NDArrayIter
- (.toIndexedSeq (util/list-map data))
- (if label
- (.toIndexedSeq (util/list-map label))
- (util/empty-indexed-seq))
- (int data-batch-size)
- shuffle
- last-batch-handle)
- (new NDArrayIter
- (util/vec->indexed-seq data)
- (if label (util/vec->indexed-seq label) (util/empty-indexed-seq))
- (int data-batch-size)
- shuffle
- last-batch-handle
- data-name
- label-name))))
+ (if (map? data)
+ (new NDArrayIter
+ (.toIndexedSeq (util/list-map data))
+ (if label
+ (.toIndexedSeq (util/list-map label))
+ (util/empty-indexed-seq))
+ (int data-batch-size)
+ shuffle
+ last-batch-handle)
+ (new NDArrayIter
+ (util/vec->indexed-seq data)
+ (if label (util/vec->indexed-seq label) (util/empty-indexed-seq))
+ (int data-batch-size)
+ shuffle
+ last-batch-handle
+ data-name
+ label-name)))
([data]
(ndarray-iter data {})))