The concatenate function allows binding arrays together along a common axis, using the syntax seen on the screen. This approach requires that the arrays have similar shapes along the axes not used for binding. The result is a brand new ndarray that is the product of this gluing of arrays together. Other similar functions exist for this purpose, such as stack. We will not cover all of them.
Let's suppose that we want to add more rows to arr2. Use the following code to do this:
We create a brand new array. We don't need to use the copy method in this situation. This is the result:
We have added a fourth row to this array, binding a new array with the data (names in the array). It is still a two-dimensional array. For example, see the array in the following example. You can clearly see this is two-dimensional but has a single column, whereas the previous...