You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/08/18 22:36:43 UTC

[GitHub] gigasquid commented on a change in pull request #12064: Allow stop of arange to be inferred from dims.

gigasquid commented on a change in pull request #12064: Allow stop of arange to be inferred from dims.
URL: https://github.com/apache/incubator-mxnet/pull/12064#discussion_r211087102
 
 

 ##########
 File path: contrib/clojure-package/src/org/apache/clojure_mxnet/ndarray.clj
 ##########
 @@ -86,7 +86,17 @@
   ([start stop  {:keys [step repeat ctx dtype]
                  :or {step (float 1) repeat (int 1) ctx (mx-context/default-context) dtype base/MX_REAL_TYPE}
                  :as opts}]
-   (NDArray/arange (float start) ($/option (float stop)) step repeat ctx dtype))
+   (NDArray/arange (float start) ($/option (float stop)) step repeat false ctx dtype))
+  ([start stop]
+   (arange start stop {})))
+
+(defn arange-with-inference
+  "Behaves like arange operator, but infers the stop value from the output shape,
 
 Review comment:
   Nice job adding the clojure function with nice documentation. 👍 If you are feeling up to it you could also add the corresponding test for it here https://github.com/apache/incubator-mxnet/blob/master/contrib/clojure-package/test/org/apache/clojure_mxnet/ndarray_test.clj#L141

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services