Check this issue by the following code.
The lines in the plot should be the same.
import numpy as np
import matplotlib.pyplot as plt
data = np.arange(1000)
a = np.empty((1000, 2))
b = np.empty((2, 1000))
plt.figure()
a[:, 0] = data
plt.psd(a[:, 0])
b[0, :] = data
plt.psd(b[0, :])
plt.show()

Check this issue by the following code.
The lines in the plot should be the same.