code: def l1_cross_distances(X):
      """
      Computes the nonzero componentwise L1 cross-distances between the vectors
      in X.
  
      Parameters
      ----------
  
      X: array_like
          An array with shape (n_samples, n_features)
  
      Returns
      -------
  
      D: array with shape (n_samples * (n_samples - 1) / 2, n_features)
          The array of componentwise L1 cross-distances.
  
      ij: arrays with shape (n_samples * (n_samples - 1) / 2, 2)
          The indices i and j of the vectors in X associated to the cross-
          distances in D: D[k] = np.abs(X[ij[k, 0]] - Y[ij[k, 1]]).
      """
      X = check_array(X)
      n_samples, n_features = X.shape
      n_nonzero_cross_dist = n_samples * (n_samples - 1) // 2
      ij = np.zeros((n_nonzero_cross_dist, 2), dtype=np.int)
      D = np.zeros((n_nonzero_cross_dist, n_features))
      ll_1 = 0
      for k in range(n_samples - 1):
          ll_0 = ll_1
          ll_1 = ll_0 + n_samples - k - 1
          ij[ll_0:ll_1, 0] = k
          ij[ll_0:ll_1, 1] = np.arange(k + 1, n_samples)
          D[ll_0:ll_1] = np.abs(X[k] - X[(k + 1) : n_samples])
  
      return D, ij
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/gaussian_process/gaussian_process.py
imports: from __future__ import print_function
  import numpy
  from scipy import linalg, optimize
  from ..base import BaseEstimator, RegressorMixin
  from ..metrics.pairwise import manhattan_distances
  from ..utils import check_random_state, check_array, check_X_y
  from ..utils.validation import check_is_fitted
  from .None import regression_models
  from .None import correlation_models
  from ..utils import deprecated
label_desc: Use image node_id 1 for calling a global function with example usage: l1_cross_distances(X) and returns: D,  ij