Skip to content

Commit

Permalink
Do not cast array indices to ints
Browse files Browse the repository at this point in the history
This was necessary under SWIG, but not under pybind11.
  • Loading branch information
jdswinbank committed Jun 25, 2020
1 parent 3af7811 commit c3b6ca9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/lsst/afw/table/multiMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ def build(cls, catalog, groupField="object"):
groups = numpy.zeros(len(ids), dtype=object)
ends = list(indices[1:]) + [len(catalog)]
for n, (i1, i2) in enumerate(zip(indices, ends)):
# casts are a work-around for DM-8557
groups[n] = catalog[int(i1):int(i2)]
groups[n] = catalog[i1:i2]
assert (groups[n].get(groupKey) == ids[n]).all()
return cls(catalog.schema, ids, groups)

Expand Down

0 comments on commit c3b6ca9

Please sign in to comment.