Reputation: 89
I was studying concatenation of numpy arrays, where I encountered this code snippet:
# concatenate along the second axis (zero-indexed)
np.concatenate([grid, grid], axis=1)
What does the term zero-indexed mean in this context?
Maybe this screenshot may help you understand my problem:
Upvotes: 0
Views: 4358
Reputation: 475
Python uses zero-based indexing. That means, the first element(value 'red') has an index 0, the second(value 'green') has index 1, and so on. Since you are concatenating its relevant as the array starts with 0 index
Upvotes: 1