-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix typo in fast templates test #2651
Fix typo in fast templates test #2651
Conversation
Yeah, I'm getting -5943.21 sometimes, so I don't think it's a rounding issue ^^ I'll go digging to understand what's going on! |
This is good for me, Thanks Alessio :) |
@@ -864,20 +864,20 @@ def estimate_templates_with_accumulator( | |||
|
|||
# average | |||
waveforms_sum = np.sum(waveform_accumulator_per_worker, axis=0) | |||
template_means = waveforms_sum | |||
template_means = waveforms_sum.copy() |
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.
We need a copy only if computing STD otherwise the copy is useless.
I don't like this, Of course it's not used in this case, but I think it's bad practice (what if someone implements something in 8 months from now? This is a potential bug) |
This was a request from @samuelgarcia, since copying the buffer can be large for many units... |
memory allocation is not a detail. we should carrefully have this in mind. |
I agree that memory allocation is not a detail and not something to take likely, But having two variables (representing completely different things) pointing to the same address seems dubious to me ... |
Co-authored-by: Zach McKenzie <92116279+zm711@users.noreply.github.com>
@DradeAW there was a typo in the tests, but still fast and normal templates give the same stds down to the 4th decimal (which I think it's ok)