Closed 9SMTM6 closed 2 years ago
There is a way:
val cube = mk.rand<Float>(30, 30, 30)
val xy_plane = cube[Slice.bounds, Slice.bounds, 2]
Or yes, as you say, pass all borders manually:
val cube = mk.rand<Float>(30, 30, 30)
val xy_plane = cube[0..30, 0..30, 2]
This api is not very informative and I don't like it, maybe it will change. Also, with the appearance of open-ended ranges in Kotlin, they will also appear in multik.
Ah, that looks like exactly what I'm looking for.
Yeah, if you mean numpys general API, thats also a bit annoying at times, its difficult to find documentation because there is no obvious way to search for it, Kotlin/specifically Multiks inherits that, though perhaps to a lesser degree, as there is often an operator method.
Anyways, I think perhaps other people would also appreciate that bit in the Readme, but thats your decision, If I find another obvious place to document it I'll let you know, otherwise I'd consider this solved.
There doesnt seem to be an easy way to do the equivalent of
you will need to manually add the limits to the earlier elements making it a lot less readable.
I understand that that specific syntax probably isnt possible in Kotlin, but I would appreciate a way to "ignore" some axes with less verbosity, like a method, where you can pass just the data for dimension3 or similar, and the remaining axes will be included in their entirety.