Fork me on GitHub
#core-matrix
<
2017-04-12
>
mikera08:04:17

Hi I check the channel occasionally but GitHub issues might be a better way to query (especially if it is likely to be a common issue where the answer may help others)

mikera09:04:38

For you select example I get [[1 2 1] [3 4 3] [5 6 5]] which is what you expect?

mikera09:04:18

index is a constructor function, for creating index instances. Some implementations may have custom index types, this lets you build them

mikera09:04:30

index-seq gets a sequence of the above indices which cover the whole array. You might filter them if you wanted to access specific elements for example. Having said that, this is a bit of a specialised function so unless you really know why you need this there is probably a better / faster approach

jsa-aerial23:04:35

Yes, I get the [[1 2 1] [3 4 3] [5 6 5]] which is not what I would expect. The expectation is that this is an example of 'integer indexing' ala' numpy or matlab, http://et.al. And there the expectation for this is the first vector selects the (in this case) rows and the second vector selects the elements in those rows. So, the expected return is [1 4 1]. This semantic seems rather more useful than the one select actually uses. I don't really see the point of the semantic it actually has.

jsa-aerial23:04:19

Also, wrt to these index instances, what part of the api actually uses them? None of the obvious candidates select, slice, submatrix, ... seem to take these as legal input.