Need to change these two lines such that they return a float, not a `np.ndarray` of size 1.