mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2025-01-01 10:30:58 +00:00
Added byte_bounds_offset to determine location of start of segment in source data
This commit is contained in:
parent
e96a27bd9d
commit
53261afdb0
@ -244,6 +244,9 @@ class DefaultSegment(object):
|
||||
self.data[index] = value
|
||||
self._search_copy = None
|
||||
|
||||
def byte_bounds_offset(self):
|
||||
return np.byte_bounds(self.data)[0]
|
||||
|
||||
def tostring(self):
|
||||
return self.data.tostring()
|
||||
|
||||
@ -335,6 +338,9 @@ class IndexedByteSegment(DefaultSegment):
|
||||
self.data[self.order[index]] = value
|
||||
self._search_copy = None
|
||||
|
||||
def byte_bounds_offset(self):
|
||||
return np.byte_bounds(self.data)[0] + self.order[0]
|
||||
|
||||
def tostring(self):
|
||||
return self.data[self.order[:]].tostring()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user