np.squeeze: Remove Axes of Length One From an Array

Table of Contents

np.squeeze: Remove Axes of Length One From an Array

If one or more of your axes are of length one, you can remove those axes using numpy.squeeze.

Link to previous tips on NumPy.

Scroll to Top

Work with Khuyen Tran

Work with Khuyen Tran