core-matrix

intended for specific discussion around core.matrix (usage and development) For general data work check out #data-science
2016-03-17T08:23:40.000017Z

Hi @bkamphaus I'd normally just use a Clojure range and reshape or broadcast accordingly

2016-03-17T08:23:45.000018Z

e.g. (m/reshape (range 1 10) [3 3]) [[1 2 3] [4 5 6] [7 8 9]]

2016-03-17T08:24:20.000019Z

Is that what you are after?

bkamphaus 2016-03-17T15:03:37.000020Z

@mikera: I guess maybe best to step back. From numpy, IDL, etc. I’m used to using index arrays to accomplish a lot of things - arbitrary re-ordering, filtering out bad data (i.e. find replace Nan or -1 -99999 etc.) — there are some things where it’s obvious what Clojure semantic it makes sense to reach for, and others where I’m not sure of the best way to approach something without stepping through a path where I lose all core.matrix performance characteristics.

bkamphaus 2016-03-17T15:05:47.000021Z

where it came up in this case was arbitrarily swapping rows in a matrix (or elements, or 2d in 3d), my first pass impulse was to take a range of indices and do a replace {3 0 0 3} e.g. to swap first and fourth rows and get a re-ordered view.

😡 1