Skip to content

Commit

Permalink
Merge pull request #333 from ErlendHaa/performance-writing-lines
Browse files Browse the repository at this point in the history
Write each trace only on time in HeaderLine
  • Loading branch information
jokva authored Nov 29, 2018
2 parents 7dc9e3b + 3b5b943 commit 7a9954f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/segyio/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ def __getitem__(self, index):

else:
step = self.stride * len(self.offsets)
return self.header[start::step]
stop = start + step * self.length
return self.header[start:stop:step]

def gen():
irange, orange = self.ranges(index, offset)
Expand Down Expand Up @@ -496,7 +497,8 @@ def __setitem__(self, index, val):
pass

step = self.stride * len(self.offsets)
self.header[start::step] = val
stop = start + step * self.length
self.header[start:stop:step] = val
return

irange, orange = self.ranges(index, offset)
Expand Down

0 comments on commit 7a9954f

Please sign in to comment.