If one or more of your axes are of length one, you can remove those axes using numpy.squeeze.
numpy.squeeze
Link to previous tips on NumPy.
array-to-latex: Turn a Numpy Array into Latex
unyt: Manipulate and Convert Units in NumPy Arrays
NumPy.take: Take Elements From an Array