Add mul method to wmodes#195
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
==========================================
- Coverage 43.78% 43.46% -0.32%
==========================================
Files 86 86
Lines 6550 6621 +71
Branches 1070 1082 +12
==========================================
+ Hits 2868 2878 +10
- Misses 3424 3485 +61
Partials 258 258 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
keefemitman
left a comment
There was a problem hiding this comment.
Thanks @akhairna! Just two minor comments/edit requests.
|
@duetosymmetry, @keefemitman & @moble - The |
|
I think there needs to be some clarification on how the two waveforms' multiplication_truncators are used. It needs to be well-documented what happens if they have two different values. I think the simplest would be to use the multiplication_truncator from the left argument, unless it's missing, in which case to use the one from the right argument; unless they are both missing, in which case to fall back on a default. |
|
This might be a good opportunity to close #21. Specifically, the One thing all four of these share is that we need to check that they are comparable. Your current check that the frames are close is a start, but I think it would be better to have a helper method to check that the frame types are the same, and that the frame and time arrays are not only close, but actually equal. I don't see how two waveforms would get similar but not equal frames or times. It looks like these algebraic functions work currently, but just because of the inheritance from np.array, which should be considered a bug; when they involve two WaveformModes, they should always be checked for comparable data. |
|
Hi @moble, I am sorry I had to rebase it on top of the recent commits that were merged on upstream. Otherwise the git history wasn't clean. |
|
Hi @moble, @duetosymmetry, @keefemitman - I incorporated some of the suggestions.
Any suggestions on the updated structure of the |
|
Just so we don't forget: this PR is dependent on moble/spherical#28 . After that is merged and spherical has a version bump, the dependencies in pyproject.toml will need to be bumped in this PR. |
|
New dep is |
|
Hi @moble, @keefemitman, and @duetosymmetry.
|
|
@moble, @duetosymmetry & @keefemitman - Based on the discussion during vacuum call, I have modified the |
keefemitman
left a comment
There was a problem hiding this comment.
Thanks for doing this @akhairna. Unfortunately I think there's a few annoying bugs/issues present still.
|
Hi @moble, @keefemitman, and @duetosymmetry. With these new commits, there shouldn't be any issue regarding shape of two WModes while doing algebra. As long as they are compatible via the |
keefemitman
left a comment
There was a problem hiding this comment.
Sorry to request another change @akhairna. But I approve the PR after this.
Co-authored-by: Mike Boyle <moble@users.noreply.github.com>
Co-authored-by: Mike Boyle <moble@users.noreply.github.com>
Hi @moble, @duetosymmetry, and @keefemitman. I am adding the
__mul__method to the waveform modes class. Using this we can implement multiplication between waveform modes of different array size. I am using the attributes of the first Wmodes object to define thel_maxof product. Please suggest improvements for this.📚 Documentation preview 📚: https://sxs--195.org.readthedocs.build/en/195/