Does anyone knows why it is returning NAN values when I use ArrayFire af::Max on 2D array? This is ok when I am doing it on a 1D array, but, when I wanted to do it on a 2D array, it doesn't work, but, the documentation says NAN values are ignored. So, did I do something wrong?
If I drop the first row, it works. But, if I have NAN all over the places, I would be screwed, so, I better do this correctly.
af::array maxSlopeIndexes;
af::array maxSlopes;
af::max(maxSlopes, maxSlopeIndexes, slopes, 0);
af_print(maxSlopeIndexes);
af_print(maxSlopes);
slopes
[6 3 1 1]
-nan(ind) -nan(ind) -nan(ind)
-1.0000 -2.0000 -3.0000
0.5000 0.0000 -0.5000
3.0000 2.6667 2.3333
0.7500 0.5000 0.2500
0.8000 0.8000 0.8000
maxSlopeIndexes
[1 3 1 1]
0 0 0
maxSlopes
[1 3 1 1]
-nan(ind) -nan(ind) -nan(ind)
Thank you