code: def hz2cents(freq_hz, base_frequency=10.0):
      
      freq_cent = np.zeros(freq_hz.shape[0])
      freq_nonz_ind = np.flatnonzero(freq_hz)
      normalized_frequency = np.abs(freq_hz[freq_nonz_ind])/base_frequency
      freq_cent[freq_nonz_ind] = 1200*np.log2(normalized_frequency)
  
      return freq_cent
docs: Convert an array of frequency values in Hz to cents.
      0 values are left in place.
  
      Parameters
      ----------
      freq_hz : np.ndarray
          Array of frequencies in Hz.
      base_frequency : float
          Base frequency for conversion.
          (Default value = 10.0)
  
      Returns
      -------
      cent : np.ndarray
          Array of frequencies in cents, relative to base_frequency