From 956fd5829442ad78cc830ea33aa252fb1d03086f Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Tue, 18 Sep 2018 17:01:26 -0700 Subject: [PATCH] Allow DefaultSegment to be created from a simple numpy array --- atrcopy/segments.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atrcopy/segments.py b/atrcopy/segments.py index 2288b3f..e64d496 100644 --- a/atrcopy/segments.py +++ b/atrcopy/segments.py @@ -414,7 +414,8 @@ class DefaultSegment: def set_raw(self, rawdata): if type(rawdata) != SegmentData: - log.warning(f"data not in SegmentData format {rawdata}, {type(rawdata)}") + log.warning(f"data not in SegmentData format: {type(rawdata)}") + rawdata = SegmentData(rawdata) self.rawdata = rawdata self.update_raw_pointers()