Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from hoechenberger/pandas-sort
Browse files Browse the repository at this point in the history
RF: Switch to new pandas sorting API
  • Loading branch information
hoechenberger committed Oct 12, 2015
2 parents 1699aa4 + 334812f commit 14a329b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pphelper/racemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def gen_cdf(rts, t_max=None):
# with the 'maximum' method (i.e. in the case of ties, all ties
# will receive the highest possible rank), select all unique ranks,
# and use these to calculate the plotting positions.
rts_sorted = rts.order()
rts_sorted = rts.sort_values(inplace=False)
p = np.unique(rankdata(rts_sorted, method='max')) / len(rts_sorted)

# rts_unique are the x values corresponding to our plotting positions.
Expand Down Expand Up @@ -406,7 +406,7 @@ def gen_cdfs_from_dataframe(data, rt_column='RT',
"""
if names is None:
names = data[modality_column].sort(inplace=False).unique()
names = data[modality_column].sort_values(inplace=False).unique()

if not data[modality_column].isin(names).all():
raise AssertionError('Could not find specified data.')
Expand Down

0 comments on commit 14a329b

Please sign in to comment.