3 ms·
I didn't think 1 based arrays would be a big deal, but whenever I try to port code from Julia to almost any other environment (C++, python/numpy, scala, JS), it
by dangjc 9y ago
I didn't think 1 based arrays would be a big deal, but whenever I try to port code from Julia to almost any other environment (C++, python/numpy, scala, JS), it becomes one of the hardest things to reason about quickly and correctly.
- ScottPJones 9y ago1-based arrays, and column-major layout of arrays annoyed me at first, however, one of the beautiful things is that much of Julia is written in Julia. If you want 0-based (or arbitrary based!) arrays, then simply use the https://github.com/JuliaArrays/OffsetArrays.jl https://github.com/JuliaArrays/OffsetArrays.jl package, and PermutedDimArrays have been added to Base, to handle some of the issues of dealing with row-major (and other sorts of memory layout) matrices.
- moomin 9y agoDoesn't this mean that instead you're now dealing with inconsistent data representations?