For example, I have a group of multidimensional arrays. I want to write a method to specify the slice size for this array, for example:
slice = data[:a, :b, :c]
Because I could only get the list [a, b, c]. I want to know how to convert this list to a slice index. Or is there a way to associate a list with a slice index to manage this array as:
list = [a, b, c]
slice = data[list]
Any answer would be appreciated.
source
share