I’ve always thought that axis 0 is row-wise, and axis 1 is column-wise.
Although this might not be the most rigorous derivation of the Gaussian PDF (Probability Density Function), this note might help you understand it more intuitively.