Re:Swift for TensorFlow Shuts Down
by ZephyrBlu on Saturday February 13, 2021 @08:14AM
(#26123423)
What I mean is something like this:
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...
[ Parent
| on HN ]
Re:Swift for TensorFlow Shuts Down
by improbable22 on Saturday February 13, 2021 @08:59AM
(#26123617)
OK, I thought you were advocating zero based on complicated index calculations for some algorithm, with mod & div, which is what I was trying to say could be abstracted away. The literal syntax `a=[1,2,3]` makes a one-dimensional `Array{Int,1}` whose first element is indeed `a[1]`. (`b` is an array of arrays, while `c = [1 2 3; 4 5 6]` is an honest 2-dimensional array.)