Dimension in the sense of geometry (2 axis representation): When we see geometrically it is about seeing data as rows/instances and columns/features/dimensions. Here the dimensions are the columns or features of the data-set. That is, we cannot represent the data more than two axis (it will be complicated to perceive). Examples of such use cases are representing a single text file, a single picture, single audio clip, etc. And so these use cases such as many sentences in a single text file or many speech signals in a single audio clip or many pixels points in a single picture can only be represented as 2D array or matrix where each instance or row here is a 1D array or vector and the values within the vector are scalars. So here even if the columns/features/dimensions of single text file or single audio clip or single picture increases the maximum axis is only 2 which are along axis = 0 as rows and axis =1 as columns/dimensions.
But what if we want to represent multiple text files or multiple audio clips or multiple pictures?
Dimension in the sense of NumPy:
Dimensions in NumPy should be treated as in the sense of data structures. Here dimensions represents how data is stored in memory. 0D, 1D, 2D, 3D, 4D, 5D,…,ND are all about how a particular data is stored in memory.
Now if we think how to represent 2 text files it will be like extending the axis as third axis which is axis = 2 and therefore we say the representation of 2 text files stored in memory as 3D array where each one of the text file is a 2D array or matrix. Thus, 3D array is a contiguous extension of 2D arrays.
Same is the case with 4D, 5D,… ND. We extend the axis by 1 as we move on to higher dimensions for storing the data.