|
|
|
|
|
by ZephyrBlu
1953 days ago
|
|
What I mean is something like this: # one dimensional
a = [1, 2, 3]
# prints the number 1 @ index 0
print(a[0])
# multi-dimensional
b = [[1, 2, 3], [4, 5, 6]]
# prints the number 4 @ index (1, 0)
print(b[1][0])
In Julia these indexes would start from 1. It doesn't seem like `CartesianIndex` solves this, since looking at some examples you still have to specify array indexes (Which start from 1): https://docs.julialang.org/en/v1/base/arrays/#Base.Iterators... |
|