Skip to content
Snippets Groups Projects
Commit 743eb257 authored by Florent Jaillet's avatar Florent Jaillet
Browse files

Correcting waveform.py (should improve its test coverage)

parent e31910e6
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -169,7 +169,8 @@ class Waveform(MadArray): ...@@ -169,7 +169,8 @@ class Waveform(MadArray):
raise ValueError(errmsg.format(inputs[0].fs, inputs[1].fs)) raise ValueError(errmsg.format(inputs[0].fs, inputs[1].fs))
output = output.view(Waveform) 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 return output
...@@ -771,7 +772,7 @@ class Waveform(MadArray): ...@@ -771,7 +772,7 @@ class Waveform(MadArray):
def copy(self): def copy(self):
return Waveform(self) return Waveform(self)
# def __add__(self, other): def __add__(self, other):
if isinstance(other, Waveform) and self.fs != other.fs: if isinstance(other, Waveform) and self.fs != other.fs:
errmsg = 'Waveforms do not have the same fs: {} and {}' errmsg = 'Waveforms do not have the same fs: {} and {}'
raise ValueError(errmsg.format(self.fs, other.fs)) raise ValueError(errmsg.format(self.fs, other.fs))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment