Skip to content

Commit

Permalink
bug: #113 Deal with case when no objectids are valid in geology file
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyThomsonMonash committed Nov 28, 2023
1 parent ad37d7e commit f3f5438
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion map2loop/m2l_map_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ def check_geology_map(
vals = geology[
geology[c_l["o"]].astype(str).str.replace(".", "", 1).str.isdigit()
][c_l["o"]].astype(int)
next_index = int(np.nanmax(vals)) + 1
if len(vals):
next_index = int(np.nanmax(vals)) + 1
else:
next_index = 0
for ind, layer in geology.iterrows():
if pd.isna(layer[c_l["o"]]):
geology.loc[ind, c_l["o"]] = next_index
Expand Down

0 comments on commit f3f5438

Please sign in to comment.