cumfirstNot#

swordfish.function.cumfirstNot()#

If X is a vector:

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

  • If k is specified, return the first 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.