Skip to content

Use getindex for vector creation #2053

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

albinahlback
Copy link
Contributor

Now ZZ[1, 2, 3, 4] should create a vector. Still allows for getting generators via S[i]. Will be overloaded with specific methods since this is very generic.

Solves #2052

@thofma
Copy link
Member

thofma commented Apr 3, 2025

Isn't R[1] ambiguous? And what about R[:x]?

@albinahlback
Copy link
Contributor Author

Isn't R[1] ambiguous?

Yes, but it will always default to gens(R, 1).

And what about R[:x]?

It will still work as VarName is stricter than Any.

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.36%. Comparing base (2479164) to head (acc4fd3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2053   +/-   ##
=======================================
  Coverage   88.36%   88.36%           
=======================================
  Files         125      125           
  Lines       31551    31552    +1     
=======================================
+ Hits        27880    27881    +1     
  Misses       3671     3671           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lgoettgens
Copy link
Member

Isn't R[1] ambiguous?

Yes, but it will always default to gens(R, 1).

It is still very unintuitive for users. And as far as I can see, the syntax does not allow to create singleton vectors. (What about empty vectors?)

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

Successfully merging this pull request may close these issues.

3 participants