From d9ced9fbd2c417ebfdefe31e8ddc771897578b46 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Fri, 17 Mar 2017 23:43:43 -0700 Subject: [PATCH] Fixed get_comment_locations: was using a copy and returning a subset of the original --- atrcopy/segments.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atrcopy/segments.py b/atrcopy/segments.py index 492e960..98364ad 100644 --- a/atrcopy/segments.py +++ b/atrcopy/segments.py @@ -3,6 +3,7 @@ import cStringIO import uuid import numpy as np +from profilehooks import coverage from errors import * from utils import to_numpy, to_numpy_list @@ -500,10 +501,10 @@ class DefaultSegment(object): r = self.rawdata.copy() print len(r.style) print len(r.style_base) - base = r.style_base & style_bits + r.style_base[:] &= style_bits comment_indexes = np.asarray(self.rawdata.extra.comments.keys(), dtype=np.uint32) print comment_indexes - base[comment_indexes] |= comment_bit_mask + r.style_base[comment_indexes] |= comment_bit_mask return r.style def get_entire_style_ranges(self, split_comments=None, **kwargs):