-
Notifications
You must be signed in to change notification settings - Fork 2
Add complex support to np_assert_allclose macro
#103
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
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 extends the np_assert_allclose! macro to support both f64 and Complex<f64> values by adding helper methods to the existing ExtendedErrorArg trait and updating the macro implementation to use these trait methods instead of type-specific operations.
- Added
xsf_magnitude()andxsf_is_nan()helper methods to theExtendedErrorArgtrait - Updated
np_assert_allclose!macro to work generically with both numeric types - Simplified test code by removing custom assertion helpers and using the updated macro
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/xsf/fp_error_metrics.rs | Added helper methods to ExtendedErrorArg trait for magnitude and NaN checking |
| src/macros.rs | Updated np_assert_allclose macro to use trait methods instead of f64-specific operations |
| src/xsf/fresnel.rs | Replaced local assert_allclose function with np_assert_allclose macro |
| src/xsf/sph_harm.rs | Simplified nested loops to use np_assert_allclose macro |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
This is an experiment to see how capable copilot is nowadays |
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Conclusion; pretty incapable |
aab4479 to
9e39ce6
Compare
np_assert_allclose macro
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
9e39ce6 to
c55bc9c
Compare
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
c55bc9c to
f0cf1b0
Compare
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
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f0cf1b0 to
b38ac3b
Compare
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
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.