-
Notifications
You must be signed in to change notification settings - Fork 0
add support for Base.repeat, Base.reverse & update README
#1
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
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
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 adds support for Base.repeat to PeriodicArray by properly handling both inner and outer repetition while maintaining the periodic boundary conditions. The key innovation is adjusting the map function to account for the enlarged unit cell when using outer repetition.
Key changes:
- Implements
Base.repeatforPeriodicArraywith support for bothinnerandouterkeyword arguments - Correctly tiles the array with translated values using the original map function for outer repetition
- Creates a new map function that amplifies shifts to account for the larger super-cell structure
- Adds comprehensive tests for 1D and 2D cases with various translation functions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/PeriodicArrays.jl | Implements Base.repeat for PeriodicArray with proper handling of inner/outer repetition and map transformation |
| test/test_nontrivial_boundary.jl | Adds comprehensive test coverage for 1D and 2D repeat operations with multiple translation functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Base.repeatBase.repeat & update README
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Base.repeat & update READMEBase.repeat, Base.reverse & update README
This PR adds support for
Base.repeatby enlarging the unit cell of thePeriodicArrayand adjusting themapaccordingly.The README is also updated with new installation instructions after this package was registered in the julia General registry.