Ivorforce / NumDot

Tensor math and scientific computation for the Godot game engine.
https://numdot.readthedocs.io
MIT License
20 stars 7 forks source link

Better range index syntax (aka python's a[start:stop:stride]) #6

Open Ivorforce opened 2 months ago

Ivorforce commented 2 months ago

The current syntax is very verbose to write, holding nothing against python's own a[2:, :2] syntax.

This would require an addition to the godot language though, because it's a syntax change. Specifically, two things would be very helpful:

1) Array access would need to support multiple objects (a[b, c]). This could be achieved by either

I'm much more on board with 1) than I am with 2), because the a[start:stop:step] syntax has always felt pretty arbitrary to me. I don't have a better suggestion right now, but I'm sure we can find something that isn't so explicitly python.