Skip to content

Commit

Permalink
Allow index to be any kind of integer
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 20, 2024
1 parent 836317f commit 95a70e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyext/src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import IMP.rmf
from collections import defaultdict, OrderedDict
import warnings
import numpy
import numbers


def _get_system_for_hier(hier):
Expand Down Expand Up @@ -637,7 +637,7 @@ def __init__(self, index):

def add(self, index):
'''index can be a integer or a list of integers '''
if isinstance(index, (int, numpy.int32, numpy.int64)):
if isinstance(index, numbers.Integral):
mergeleft = None
mergeright = None
for n, s in enumerate(self.segs):
Expand Down

0 comments on commit 95a70e1

Please sign in to comment.