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
Your email address will not be published. Required fields are marked *
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Δ