seems a great work on array Lloda , for Guile , i can not use it directly in Scheme+ because i search portable code compatible with Racket too (and any scheme that support SRFI 105 curly infix), but perhaps there is not a lot of work to port it , indeed your library seems very powerful ,make me thing of Numpy arrays in pythons. Thanks again. Damien
On Mon, Jun 19, 2023 at 6:37 PM lloda <ll...@sarc.name> wrote: > > My library guile-newra (1) has quite general multidimensional array > slicing. The indices can be linear ranges or arbitrary integer arrays and > they can have any rank. You can also use the indexed array as write target. > If all the indices are linear ranges then the operation is done without > copies. It also has placeholders, so you can skip axes, like : and ... in > numpy. guile-newra's arrays are applicative, so you can do (thearray > firstindex secondindex ...), without special brackets. > > You need wrappers to use it with Guile's native array types, so it may not > be as convenient. Or maybe you don't need to handle arbitrary rank, then it > might not be the best option. It's also far from finished, although the > stuff I mentioned above does work. > > I didn't adopt Pythons -1 = end convention because in Guile arrays can > have any base index, not necessarily 0 (whether that's a good idea or not). > > (1) https://lloda.github.io/guile-newra/#Slicing < > https://lloda.github.io/guile-newra/#Slicing> > https://github.com/lloda/guile-newra/ < > https://github.com/lloda/guile-newra/> > https://notabug.org/lloda/guile-newra < > https://notabug.org/lloda/guile-newra> > >