I do not think that the behavior of NArray is bad, but I feel that it may not be consistent with the results below.
a = Numo::DFloat(4).seq
b = a > 1
a[b]
# [2, 3]
a = Numo::DFloat(1, 4).seq
b = a[0,true] > 1
a[true, b]
# [[0, 0, 1, 1]]
Use Case
The Rumale Machine Learning Library uses a 2D NArray as a form of sample data. I use Rumale to classify my sample data. The classification results of Rumale is a 1-dimensional NArray. I would like to separate sample data using boolean indexing.
Hello
I just found out the big difference between NArray and NumPy.
NumPy
Ruby
I do not think that the behavior of NArray is bad, but I feel that it may not be consistent with the results below.
Use Case
The Rumale Machine Learning Library uses a 2D NArray as a form of sample data. I use Rumale to classify my sample data. The classification results of Rumale is a 1-dimensional NArray. I would like to separate sample data using boolean indexing.
Thank you.