core-matrix

intended for specific discussion around core.matrix (usage and development) For general data work check out #data-science
eggsyntax 2017-06-18T13:42:27.039356Z

I've been starting to experiment with core.matrix, and I've been using code like ((mat 2) 1) to pull out individual values from a 2d matrix when needed. Just switched to vectorz-clj, and that no longer works; nor does nth. Is there some idiomatic way to pull a single value? (first (drop 1 (first (drop 2 mat)))) works, but that's kind of ugly. I couldn't find an example in the wiki of pulling out a single value...

jsa-aerial 2017-06-18T16:53:59.708027Z

The canonical way to get a scalar in c.m is mget, which should work across impls. So, if your matrix is mat, and you want the element at 2 1, (mget mat 2 1) will do it.

jsa-aerial 2017-06-18T16:54:24.709767Z

@eggsyntax ^^^^

eggsyntax 2017-06-18T17:13:47.781809Z

@jsa-aerial thanks! Read through the API, but somehow overlooked mget.