numpy np.set_printoptions(precision=3) code example Example: np print precision np.set_printoptions(precision=4)