docs: def _distance(self,x):
          """returns distance measures for features"""
          distance = np.empty([len(self.mu)])
  
          for i in np.arange(len(self.mu)):
              if self.d == 'mahalanobis' and self.is_invertible(self.Z[i]):
                      distance[i] = (x - self.mu[i]).dot(np.linalg.inv(self.Z[i])).dot((x - self.mu[i]).transpose())
              else:
                  distance[i] = (x - self.mu[i]).dot((x - self.mu[i]).transpose())
  
          return distance