Skip to content

Commit

Permalink
Explicitly cast from BinField to int
Browse files Browse the repository at this point in the history
Parsing segyio.BinField type as int in PyArg_ParseTuple is no longer
possible.
  • Loading branch information
sveinung-r committed Jul 30, 2024
1 parent 6df0892 commit eafe847
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/segyio/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def open(filename, mode="r", iline = 189,
f = segyio.SegyFile(fd,
filename = str(filename),
mode = mode,
iline = iline,
xline = xline,
iline = int(iline),
xline = int(xline),
endian = endian,
)

Expand All @@ -189,4 +189,4 @@ def open(filename, mode="r", iline = 189,
if ignore_geometry:
return f

return infer_geometry(f, metrics, iline, xline, strict)
return infer_geometry(f, metrics, int(iline), int(xline), strict)

0 comments on commit eafe847

Please sign in to comment.