Rows and Columns

Is it because of April Fools Day (1st April) or am I really stupid? I have constant issues with axes in Python. In pandas and, apparently, pytorch, axis 0 is supposed to refer to rows, and axis 1 to columns in a 2D data structure. But these are often reversed, or so it seems to me. For instance is the following code

import torch

tensor_01 = torch.tensor([1, 2, 3])
tensor_02 = torch.tensor([4, 5, 6])

tensor_cat = torch.cat((tensor_01, tensor_02))
print(tensor_cat)

Now the book says “Concatenate the tensors along dimension 0”. Dimension 0 is supposed to be the rows, so I’m imagining that this will create two rows, one for each tensor. But no, the output is as follows:

tensor([1, 2, 3, 4, 5, 6])

So it concatenated by adding columns, which I thought was supposed to be dimension 1. I’m sure there’s some point of view from which this all makes sense, but clearly I’m not seeing it from that point of view.

Actually he didn’t say ‘axis 0’ but ‘dimension 0’. So in a data structure with only one dimension, dimension 0, one would be simply adding more elements to that dimension. But in a 2D data structure, does axis and dimension mean the same thing? I’m clearly not a mathematician.