mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-02-18 03:30:39 +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()
|
self.calc_lookups()
|
||||||
|
|
||||||
def calc_lookups(self):
|
def calc_lookups(self):
|
||||||
if self.is_base:
|
if self.is_indexed:
|
||||||
# these values not needed if indexed or is base array, so force bad
|
end = len(self.data.np_data)
|
||||||
# values that will raise exception if they are used
|
self.data_start, self.data_end = 0, end
|
||||||
self.data_start, self.data_end = None, None
|
self.base_start, self.base_end = 0, end
|
||||||
self.base_start, self.base_end = None, None
|
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:
|
else:
|
||||||
self.data_start, self.data_end = np.byte_bounds(self.data)
|
self.data_start, self.data_end = np.byte_bounds(self.data)
|
||||||
self.base_start, self.base_end = np.byte_bounds(self.data.base)
|
self.base_start, self.base_end = np.byte_bounds(self.data.base)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user