mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-11-29 11:51:14 +00:00
Fixed error in calc_lookups; all tests pass
This commit is contained in:
parent
1fac3e6c31
commit
1adb4f0a61
@ -203,11 +203,14 @@ class SegmentData(object):
|
||||
self.calc_lookups()
|
||||
|
||||
def calc_lookups(self):
|
||||
if self.is_base:
|
||||
# these values not needed if indexed or is base array, so force bad
|
||||
# values that will raise exception if they are used
|
||||
self.data_start, self.data_end = None, None
|
||||
self.base_start, self.base_end = None, None
|
||||
if self.is_indexed:
|
||||
end = len(self.data.np_data)
|
||||
self.data_start, self.data_end = 0, end
|
||||
self.base_start, self.base_end = 0, end
|
||||
elif self.data.base is None:
|
||||
end = len(self.data)
|
||||
self.data_start, self.data_end = 0, end
|
||||
self.base_start, self.base_end = 0, end
|
||||
else:
|
||||
self.data_start, self.data_end = np.byte_bounds(self.data)
|
||||
self.base_start, self.base_end = np.byte_bounds(self.data.base)
|
||||
|
Loading…
Reference in New Issue
Block a user