Open
Description
Hi,
Here is a sample code in Python to sort data in an ndarray.
a = [1,2,3,4]
b = [5,6,7,8]
c = [9,10,11,12]
d = [13,14,20,22]
z = np.stack([a, b, c, d], axis=1)
output:
[[ 1 5 9 13]
[ 2 6 10 14]
[ 3 7 11 20]
[ 4 8 12 22]]
Now I use the following logical statement to sort data.
result = z[np.where(z[:,3] > 14)]
output:
[[ 3 7 11 20]
[ 4 8 12 22]]
How can I do something similar with xtensor?
Thanks in advance.
Regards,