docs: def validate_inputs(u_kn, N_k, f_k):
      """Check types and return inputs for MBAR calculations.
  
      Parameters
      ----------
      u_kn or q_kn : np.ndarray, shape=(n_states, n_samples), dtype='float'
          The reduced potential energies or unnormalized probabilities
      N_k : np.ndarray, shape=(n_states), dtype='int'
          The number of samples in each state
      f_k : np.ndarray, shape=(n_states), dtype='float'
          The reduced free energies of each state
  
      Returns
      -------
      u_kn or q_kn : np.ndarray, shape=(n_states, n_samples), dtype='float'
          The reduced potential energies or unnormalized probabilities
      N_k : np.ndarray, shape=(n_states), dtype='float'
          The number of samples in each state.  Converted to float because this cast is required when log is calculated.
      f_k : np.ndarray, shape=(n_states), dtype='float'
          The reduced free energies of each state
      """
      n_states, n_samples = u_kn.shape
  
      u_kn = ensure_type(u_kn, 'float', 2, "u_kn or Q_kn", shape=(n_states, n_samples))
      N_k = ensure_type(N_k, 'float', 1, "N_k", shape=(n_states,), warn_on_cast=False)  # Autocast to float because will be eventually used in float calculations.
      f_k = ensure_type(f_k, 'float', 1, "f_k", shape=(n_states,))
  
      return u_kn, N_k, f_k