equinor / segyio

Fast Python library for SEGY files.
Other
471 stars 213 forks source link

Return single sample in f.trace[i,j] for ints #477

Closed jokva closed 3 years ago

jokva commented 3 years ago

The intention was always for f.trace[i,j] to return a single sample when i and j were both integers:

assert f.trace[0, 1] == f.trace[0][1]

However, this evaluated to true when [i, j] returns an array, since the result of the comparison is array([True]), and which is not falsy.

Reported in https://github.com/equinor/segyio/issues/475