Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be nice to have shorter, more pythonic array sliciing syntax. #760

Open
mardukbp opened this issue Sep 7, 2019 · 1 comment
Open

Comments

@mardukbp
Copy link

mardukbp commented Sep 7, 2019

Breeze's a(1 until 5) is more verbose than Numpy's a[1:5]. The same happens with many other indexing and slicing operations. Would you consider implementing Python-like syntactic sugar, maybe using Scala macros?

In several places I have read that syntactic sugar for indexing and slicing of arrays and lists is one of the reasons for the large-scale adoption of Python for data analysis. Thanks to Breeze and other projects, the JVM ecosystem now has the potential to become a solid alternative to Python in this field. Retaining the notation that has been used for decades in Fortran, Matlab and Python would make the transition easier for many people.

@dlwh
Copy link
Member

dlwh commented Nov 18, 2019

can you suggest a syntax? actual python indexing isn't valid scala. I agree it's not ideal, but I'm not sure what to do

@dlwh dlwh changed the title Syntactic sugar for indexing and slicing Would be nice to have shorter, more pythonic array sliciing syntax. Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants