cumlastNot#

swordfish.function.cumlastNot()#

If X is a vector:

  • If k is unspecified, return the last non-null element in X;

  • If k is specified, return the last element that is not k.

If X is a matrix, conduct the aforementioned calculation within each column of X. The result is a matrix with the same shape as X.

Parameters:
  • X (Constant) – A scalar/vector/matrix/table/tuple (with scalars or equal-length vectors)/dictionary.

  • k (Constant) – A scalar.