This allows performing data filtering, as well as sorting, in structured NDArrays. For example, given an array sarr with fields 'a', 'b' and 'c', the next:
puts in farr the indices of the rows that fulfills that values in fields in 'b' are larger than values in 'c' ("b >= c" above), sorted by column 'c'.
farr is in turn an NDArray, so it is compressed; think of it as a compact index for other tasks.
See the new examples/ndarray/filter_sort_fields.py self-contained script.
This allows performing data filtering, as well as sorting, in structured NDArrays. For example, given an array
sarr
with fields 'a', 'b' and 'c', the next:puts in
farr
the indices of the rows that fulfills that values in fields in 'b' are larger than values in 'c' ("b >= c"
above), sorted by column 'c'.farr
is in turn an NDArray, so it is compressed; think of it as a compact index for other tasks. See the newexamples/ndarray/filter_sort_fields.py
self-contained script.