Fix DeprecationWarning that occurs during build due to converting an np.ndarray to a scalar implicitly