Skip to content

Commit 8a07434

Browse files
committed
update cgm for pandas-0.23.0
fix for the stricter error introduced by pandas-dev/pandas#19230
1 parent c90bfd5 commit 8a07434

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nbodykit/algorithms/cgm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def callback(r, i, j):
332332
# to find centrals, considers objects that could be satellites of another
333333
# (pairs with sort_j > sort_i)
334334
possible_cens = df[(df['sort_j']>df.index.values)]
335-
possible_cens = possible_cens.drop(centrals)
335+
possible_cens = possible_cens.drop(centrals, errors='ignore')
336336
_remove_objects_paired_with(possible_cens, centrals) # remove objs paired with cens
337337

338338
# sorted indices of objects that have pairs on other ranks
@@ -461,7 +461,7 @@ def find_local_centrals(grp):
461461
# only need to examine objects that have all higher priority pairs
462462
# on the same rank --> if they have pairs on other ranks, then they are already
463463
# marked as "maybes" centrals
464-
same_rank_df = df.drop(on_other_ranks)
464+
same_rank_df = df.drop(on_other_ranks, errors='ignore')
465465

466466
# group by centrals and find the local centrals
467467
# these are objects with no higher priority pairs

0 commit comments

Comments
 (0)