Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Clojure] Add helper function to convert formed vector to NDArray (infers shape) #14271

Closed
gigasquid opened this issue Feb 27, 2019 · 2 comments
Labels

Comments

@gigasquid
Copy link
Member

We have a ndarray function called array that will take a 1d clojure vector and a shape vector and turn it into a ndarray. The Scala function has a new helper function that allows you to pass in a dimensional float/double array and have the NDArray create it and infer the shape.

It would be nice to create an interop function for this.
Example of interop:

user=> (def x [[1.0 2.0 3.0] [4.0 5.0 6.0]])
#'user/x
user=> (NDArray/toNDArray (to-array (mapv #(to-array %) x)) nil)
#object[org.apache.mxnet.NDArray 0x382169db "[\n [1.0,2.0,3.0]\n [4.0,5.0,6.0]\n]\n<NDArray (2,3) cpu(0) float64>"]
user=> 
@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Feature

@Chouffe
Copy link
Contributor

Chouffe commented Mar 17, 2019

Should we close the issue now @gigasquid @kedarbellare?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants