BlueBrain / libsonata

A python and C++ interface to the SONATA format
https://libsonata.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
11 stars 12 forks source link

Non-empty selection of empty dataset. #322

Open 1uc opened 9 months ago

1uc commented 9 months ago

I'm looking at: https://github.com/BlueBrain/libsonata/blob/f65a0aec9197f6e74c8d75e8f78641326127dfce/src/population.hpp#L95

The question is should a non-empty selection of an empty dataset return an empty vector, or should it throw, since we've not returned the requested element? One possible answer is that it's fine since they're all out-of-range and we ignore anything out of range in edge_index too. However, I think that prior to 70559bc3d63a8dcfed1f15a645253b4a15685046 out-of-bounds selections would have been an exception for this particular routine.