Im a newbie to Numpy and trying to understand the basic question of what is dimension,
I tried the following commands and trying to understand why the ndim for last 2 arrays are same?
>>> a= array([1,2,3])
>>> a.ndim
1
>>> a= array([[1,2,3],[4,5,6]])
>>> a
array([[1, 2, 3],
[4, 5, 6]])
>>> a.ndim
2
>>> a=arange(15).reshape(3,5)
>>> a.ndim
2
>>> a
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14]])
My understanding..
Case 1:
array([[1, 2, 3],
[4, 5, 6]])
2 elements are present in main lists, so ndim is-2
Case 2:
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14]])
3 elements are present in the main lists, do ndim is-3

ndimmeans "number of dimensions". a 2D array has ndim=2, a 3D array has ndim=3, etc.