class_docstr: Maximum likelihood covariance estimator.
  
  Read more in the :ref:`User Guide <covariance>`.
  
  Parameters
  ----------
  store_precision : bool
      Specifies if the estimated precision is stored.
  
  assume_centered : bool
      If True, data are not centered before computation.
      Useful when working with data whose mean is almost, but not exactly
      zero.
      If False (default), data are centered before computation.
  
  Attributes
  ----------
  covariance_ : 2D ndarray, shape (n_features, n_features)
      Estimated covariance matrix
  
  precision_ : 2D ndarray, shape (n_features, n_features)
      Estimated pseudo-inverse matrix.
      (stored only if store_precision is True)
class_docstr_tok: ["Maximum","likelihood","covariance","estimator",".","Read","more","in","the",":","ref",":","`","User","Guide","<","covariance",">","`",".","Parameters","--","--","--","--","--","store_precision",":","bool","Specifies","if","the","estimated","precision","is","stored",".","assume_centered",":","bool","If","True",",","data","are","not","centered","before","computation",".","Useful","when","working","with","data","whose","mean","is","almost",",","but","not","exactly","zero",".","If","False","(","default",")",",","data","are","centered","before","computation",".","Attributes","--","--","--","--","--","covariance_",":","2D","ndarray",",","shape","(","n_features",",","n_features",")","Estimated","covariance","matrix","precision_",":","2D","ndarray",",","shape","(","n_features",",","n_features",")","Estimated","pseudo-inverse","matrix",".","(","stored","only","if","store_precision","is","True",")"]
docstr: Compute the squared Mahalanobis distances of given observations.
  
  Parameters
  ----------
  observations : array-like, shape = [n_observations, n_features]
      The observations, the Mahalanobis distances of the which we
      compute. Observations are assumed to be drawn from the same
      distribution than the data used in fit.
  
  Returns
  -------
  mahalanobis_distance : array, shape = [n_observations,]
      Squared Mahalanobis distances of the observations.
docstr_tok: ["Compute","the","squared","Mahalanobis","distances","of","given","observations",".","Parameters","--","--","--","--","--","observations",":","array-like",",","shape","=","[","n_observations",",","n_features","]","The","observations",",","the","Mahalanobis","distances","of","the","which","we","compute",".","Observations","are","assumed","to","be","drawn","from","the","same","distribution","than","the","data","used","in","fit",".","Returns","--","--","--","-","mahalanobis_distance",":","array",",","shape","=","[","n_observations",",","]","Squared","Mahalanobis","distances","of","the","observations","."]
code: def mahalanobis(self, observations):
      """Compute the squared Mahalanobis distances of given observations.
  
      Parameters
      ----------
      observations : array-like, shape = [n_observations, n_features]
          The observations, the Mahalanobis distances of the which we
          compute. Observations are assumed to be drawn from the same
          distribution than the data used in fit.
  
      Returns
      -------
      mahalanobis_distance : array, shape = [n_observations,]
          Squared Mahalanobis distances of the observations.
      """
      precision = self.get_precision()
      # compute mahalanobis distances
      centered_obs = observations - self.location_
      mahalanobis_dist = np.sum(
          np.dot(centered_obs, precision) * centered_obs, 1
      )
  
      return mahalanobis_dist
  
imports: import inspect
  import operator
  import os
  import warnings
  from contextlib import contextmanager
  from io import StringIO
  from math import log
  from pprint import pprint
  import numpy
label_desc: Use image node_id 7 for calling the EmpiricalCovariance obj's underlying member method code with example usage: obj.mahalanobis(observations) and returns: mahalanobis_dist