Open NiklasPhabian opened 3 years ago
This looks like a SWIG interface issue. The calls in _intersect in PySTARE.cpp are doing the right thing, but the results are not being returned to the python side.
This is somewhat curious. Depending on the subset of the sids in sid
that we use in intersection(), we get a varying case of segfaults:
pystare.intersection(sids, sids, False)
corrupted size vs. prev_size while consolidating
Aborted (core dumped)
corrupted size vs. prev_size
Aborted (core dumped)
double free or corruption (!prev)
Aborted (core dumped)
free(): invalid size
Aborted (core dumped)
Also, would we expect the intersection with itself to always be itself?
sids = numpy.array([4541880224203145223, 4254221594097877000])
res = pystare.intersection(sids, sids, False)
numpy.testing.assert_array_equal(sids, res)
we have the according tests in https://github.com/SpatioTemporal/pystare/tree/issue_36
example