Skip to content

Commit c4b061e

Browse files
committed
Use existing fill value maps for consistency
1 parent a1b1713 commit c4b061e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mdio/segy/_workers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from mdio.builder.schemas.v1.stats import CenteredBinHistogram
2828
from mdio.builder.schemas.v1.stats import SummaryStatistics
2929
from mdio.builder.xarray_builder import _get_fill_value
30+
from mdio.constants import fill_value_map
3031

3132

3233
class SegyFileArguments(TypedDict):
@@ -108,7 +109,7 @@ def trace_worker( # noqa: PLR0913
108109

109110
# The dtype.max is the sentinel value for the grid map.
110111
# Normally, this is uint32, but some grids need to be promoted to uint64.
111-
not_null = local_grid_map != np.iinfo(local_grid_map.dtype).max
112+
not_null = local_grid_map != fill_value_map.get(local_grid_map.dtype.name)
112113
if not not_null.any():
113114
return None
114115

0 commit comments

Comments
 (0)