Q. What do you understand by axes in a NumPy array ? Define axes for a 2d ndarray.


Answer :-

In a Numpy array (also called ndarray), dimensions are called axes. The number of axes is called rank. A 2-dimensional ndarray has two corresponding axes:

• The first axis running vertically downwards across rows (axis 0).
• The second axis running horizontally across columns (axis 1).

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post