Fortran-like arrays such as FArray(Float64, -1:1,-7:7,-128:512) in Julia

后端 未结 1 1739
闹比i
闹比i 2021-02-05 19:43

Generally having 1-based array for Julia is a good decision, but sometimes it is desirable to have Fortran-like array with indices that span some subranges of ℤ:



        
相关标签:
1条回答
  • 2021-02-05 20:07

    There are now two packages that provide this kind of functionality. For arrays with arbitrary start indices, see https://github.com/alsam/OffsetArrays.jl. For even more flexibility see https://github.com/mbauman/AxisArrays.jl, where indices do not have to be integers.

    0 讨论(0)
提交回复
热议问题