High dimensional array and Creating NumPy array
In the last article, we started with the NumPy package and discussed its advantages, the performance it offers. In this article, we discuss how to create a NumPy array.
Let’s just visualize what the high-dimensional array looks like. In the picture below, we have an array that contains 4 numbers, so this is a 1-D array with 4 numbers
We can use 1-D arrays to represent things like time-series data for instance what is the temperature per hour, it becomes a 1-D array.
If we expand it one dimension, it becomes a 2-D array wherein the below case there are 4 columns and 3 rows
Let’s say we have some spatial data where for every point in space we are collecting some numbers for instance temperature within a room can be a 2-dimensional array.
If we expand this further into another dimension, then we can think of it as a 3-dimensional array (consider the two arrays in the below image as being stacked together, this way there is another dimension that comes into the picture)
One example would be if we are measuring temperature across multiple floors, so the first array in the…