bebi103.gp.append_sort_index

bebi103.gp.append_sort_index(Xstar, X, index_origin=0)

Add the entries of X to Xstar, sort the result, and find indices in the results where the entries in X appear. Typically, Xstar is an array of x-values for which a GP is to be coputed and X is an array of x-values for which there are data.

Parameters
  • Xstar (array, shape (n,) or (n, d)) – Array whose unique, sorted entries are returned.

  • X (array, shape (m,) or (m, d)) – Array to be added to Xstar and whose entries have their indices returned.

  • index_origin (int, default 0) – Origin of indexing. Choose index_origin=1 for use with Stan.

Returns

  • X_out (array, 1D if X is shape (n,), 2D if X is shape (n, d)) – Sorted, unique entries of concatenation of Xstar and X.

  • inds (array, shape (n,)) – Array of indices such that X_out[inds] = X.