code: def energy(self, sample_like, dtype=np.float):
          
          energy, = self.energies(sample_like, dtype=dtype)
          return energy
docs: The energy of the given sample.
  
          Args:
              sample_like (samples_like):
                  A raw sample. `sample_like` is an extension of
                  NumPy's array_like structure. See :func:`.as_samples`.
  
              dtype (:class:`numpy.dtype`, optional):
                  The data type of the returned energies. Defaults to float.
  
          Returns:
              The energy.