Commit 743eb257 authored by Florent Jaillet's avatar Florent Jaillet

Correcting waveform.py (should improve its test coverage)

parent e31910e6
Pipeline #463 passed with stage
in 21 seconds
......@@ -169,7 +169,8 @@ class Waveform(MadArray):
raise ValueError(errmsg.format(inputs[0].fs, inputs[1].fs))
output = output.view(Waveform)
output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) else inputs[1].fs
output.fs = inputs[0].fs if isinstance(inputs[0], Waveform) \
else inputs[1].fs
return output
......@@ -771,7 +772,7 @@ class Waveform(MadArray):
def copy(self):
return Waveform(self)
# def __add__(self, other):
def __add__(self, other):
if isinstance(other, Waveform) and self.fs != other.fs:
errmsg = 'Waveforms do not have the same fs: {} and {}'
raise ValueError(errmsg.format(self.fs, other.fs))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment