core-matrix

intended for specific discussion around core.matrix (usage and development) For general data work check out #data-science
alexcatalina 2019-04-21T15:11:09.000600Z

is there an obvious way to go from vectorz/vector to a standard clojure vector?

mars0i 2019-04-21T22:48:42.001Z

@alexcatalina

(def v (matrix :vectorz [1 2 3]))

mars0i 2019-04-21T22:48:57.001300Z

user=> (matrix :persistent-vector v)
[1.0 2.0 3.0]
user=> (class (matrix :persistent-vector v))
clojure.lang.PersistentVector

mars0i 2019-04-21T22:49:49.002200Z

My core.matrix knowledge is rusty. I'm pretty sure are probably other ways, but they're probably equivalent as far as speed, etc.

mars0i 2019-04-21T22:51:27.003400Z

The idea is that even if one of the implementations is your current default, you can always add a keyword to matrix (and a few other functions, I think) to create a structure for a different implementation.

mars0i 2019-04-21T22:52:05.003700Z

PersistentVector is the standard Clojure vector.