diff --git a/appveyor.yml b/appveyor.yml index e6de92c8..ddbce40c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,5 +44,5 @@ install: - "python --version" build_script: - - "pip install numpy meta --user" + - "pip install numpy --user" - "python setup.py test" diff --git a/awkward/jagged.py b/awkward/jagged.py index 9b50de81..b296a9cc 100644 --- a/awkward/jagged.py +++ b/awkward/jagged.py @@ -273,7 +273,12 @@ def __setitem__(self, where, what): buf[startpos:stoppos] = what elif len(starts) != 0: - startposes, offsets = numpy.divmod(starts, self._dtype.itemsize) + if hasattr(numpy, "divmod"): + startposes, offsets = numpy.divmod(starts, self._dtype.itemsize) + else: + startposes = numpy.floor_divide(starts, self._dtype.itemsize) + offsets = numpy.remainder(starts, self._dtype.itemsize) + stopposes = numpy.floor_divide(stops, self._dtype.itemsize) if isinstance(what, JaggedArray):