I believe that Signal (and any of its subclasses) is fully specified by its data and samplerate. Accordingly, I overwrote the __eq__ method to check these attributes only. This should be efficient as its comparing two attributes only, not everything in the object, and it allows me to serialise/deserialise signals.
I believe that
Signal
(and any of its subclasses) is fully specified by itsdata
andsamplerate
. Accordingly, I overwrote the__eq__
method to check these attributes only. This should be efficient as its comparing two attributes only, not everything in the object, and it allows me to serialise/deserialise signals.