Skip to content

Commit

Permalink
bug: #113 Fix case when some object ids in geology file are non-int, …
Browse files Browse the repository at this point in the history
…non-float
  • Loading branch information
RoyThomsonMonash committed Nov 28, 2023
1 parent 4a721a7 commit ad37d7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions map2loop/m2l_map_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ def check_geology_map(
geology[c_l["o"]] = geology.index
# Check if some id values are blank and set appropriately
elif len(geology[~geology[c_l["o"]].isnull()]) != len(geology):
vals = geology[geology[c_l["o"]].astype(str).str.isnumeric()][
c_l["o"]
].astype(int)
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
for ind, layer in geology.iterrows():
if pd.isna(layer[c_l["o"]]):
Expand Down

0 comments on commit ad37d7e

Please sign in to comment.