-
Notifications
You must be signed in to change notification settings - Fork 1
make index typing less strict #42
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
Conversation
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR makes index typing less strict by allowing sequences of integers in addition to int, slice, and IList types. It also adds two new convenience functions to the public API for accessing grid position data.
- Adds support for accepting any
Sequenceof integers as an index inget_indices() - Exports
col_yposandrow_xposfunctions for accessing column and row positions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/bloqade/geometry/dialects/grid/types.py |
Extends get_indices() to accept generic sequences of integers, making indexing more flexible |
src/bloqade/geometry/dialects/grid/__init__.py |
Exports col_ypos and row_xpos functions to the public API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* make index typing less strict * IList is Sequence so just use Sequence check * make more generic * Adding test to check error
No description provided.