dpilger26 / NumCpp

C++ implementation of the Python Numpy library

Home Page:https://dpilger26.github.io/NumCpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

confused about nc::Axis::ROW and nc::Axis::COL

ly0303521 opened this issue · comments

When I use nc::argmax, I always confused about ROW and COL. Below is a simple example

nc::NdArray a = {{1, 2}, {3, 4}, {5, 6}};
std::cout << nc::argmax(a, nc::Axis::ROW) << std::endl;

In my mind, Axis is ROW, so get the index of max in every row, it should be [[1, 1, 1, ]], but it is [[2, 2, ]], the results about ROW and COL is reversed I think. Could you please explain this ??

I see, nc::Axis::ROW means searching the corresponding row