Fork me on GitHub

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)


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


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


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


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, 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.


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.