unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jay Sulzberger <jays@panix.com>
To: guile-user <guile-user@gnu.org>
Cc: Jay Sulzberger <jays@panix.com>
Subject: Re: Python slices in Scheme
Date: Fri, 23 Jun 2023 13:26:50 +0000 ()	[thread overview]
Message-ID: <Pine.NEB.4.64.2306231243410.443@panix3.panix.com> (raw)
In-Reply-To: <5A5012F2-7712-49AD-9337-D688F0F2CC27@sarc.name>


On Mon, 19 Jun 2023, lloda <lloda@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.

Dear lloda, I have not yet run your code, but I just now ran my eyes over

https://lloda.github.io/guile-newra/#Slicing

Heaven forwarding, I will run some of your code before the snows come.

Thank you!

oo--JS.


>
> 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>




  parent reply	other threads:[~2023-06-23 13:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-18 16:58 Python slices in Scheme Damien Mattei
2023-06-18 18:51 ` Dr. Arne Babenhauserheide
2023-06-18 20:20   ` Damien Mattei
2023-06-18 21:44     ` Dr. Arne Babenhauserheide
2023-06-19  1:52 ` Jay Sulzberger
2023-06-19 16:36   ` lloda
2023-06-19 19:44     ` Zelphir Kaltstahl
2023-06-20  6:39     ` Damien Mattei
2023-06-23 13:26     ` Jay Sulzberger [this message]
2023-06-23 19:14     ` Damien Mattei
2023-06-20  6:41   ` Damien Mattei
2023-06-20 11:22     ` Robby Zambito
2023-06-21  7:45       ` Damien Mattei
2023-06-23 13:17 ` Jay Sulzberger
2023-06-24 13:08   ` Damien Mattei
2023-06-24 16:18     ` Dr. Arne Babenhauserheide
2023-06-24 20:24       ` Damien Mattei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.NEB.4.64.2306231243410.443@panix3.panix.com \
    --to=jays@panix.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).