shapeAn array is a tuple of its size. An array with one dimension has the form (n,). A two-dimensional array has the form (n, m) (for example, your case 2 and 3), and a three-dimensional array has the form (n, m, k), etc.
Therefore, although the form of your second and third examples is different, form No. in both cases, the size is two:
>>> a= np.array([[1,2,3],[4,5,6]])
>>> a.shape
(2, 3)
>>> b=np.arange(15).reshape(3,5)
>>> b.shape
(3, 5)
If you want to add another dimension to your examples, you will need to do something like this:
a= np.array([[[1,2,3]],[[4,5,6]]])
or
np.arange(15).reshape(3,5,1)
You can add measurements this way:
One dimension:
>>> a = np.zeros((2))
array([ 0., 0.])
>>> a.shape
(2,)
>>> a.ndim
1
Two dimensions:
>>> b = np.zeros((2,2))
array([[ 0., 0.],
[ 0., 0.]])
>>> b.shape
(2,2)
>>> b.ndim
2
Three dimensions:
>>> c = np.zeros((2,2,2))
array([[[ 0., 0.],
[ 0., 0.]],
[[ 0., 0.],
[ 0., 0.]]])
>>> c.shape
(2,2,2)
>>> c.ndim
3
Four dimensions:
>>> d = np.zeros((2,2,2,2))
array([[[[ 0., 0.],
[ 0., 0.]],
[[ 0., 0.],
[ 0., 0.]]],
[[[ 0., 0.],
[ 0., 0.]],
[[ 0., 0.],
[ 0., 0.]]]])
>>> d.shape
(2,2,2,2)
>>> d.ndim
4