Skip to content

Commit

Permalink
Merge pull request #258 from rbiswas4/Issue/257/use_in1d
Browse files Browse the repository at this point in the history
Added a version dependent switch for working with `isin` and in1d`
  • Loading branch information
rbiswas4 authored Aug 2, 2018
2 parents 0685a18 + 9ef2956 commit bbd7666
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions opsimsummary/opsim_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,13 @@ def dropDuplicates(df, propIDDict, opsimversion):

orig_propID = df.propID.values
df['orig_propID'] = orig_propID
ddfmask = np.isin(df.propID, ddfID)
wfdmask = np.isin(df.propID, wfdID)
# if np.__version__ >= 1.13:
# ddfmask = np.isin(df.propID, ddfID)
# wfdmask = np.isin(df.propID, wfdID)
# else:
ddfmask = np.in1d(df.propID, ddfID)
wfdmask = np.in1d(df.propID, wfdID)

df.loc[ddfmask, 'propID'] = ddfPropID
df.loc[wfdmask, 'propID'] = wfdPropID

Expand Down
2 changes: 1 addition & 1 deletion opsimsummary/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__VERSION__ = "1.19.1"
__VERSION__ = "1.19.3"

0 comments on commit bbd7666

Please sign in to comment.