def triu!(k=0)
      if ndim < 2
        raise NArray::ShapeError, "must be >= 2-dimensional array"
      end
      if contiguous?
        *shp,m,n = shape
        idx = tril_indices(k-1)
        reshape!(*shp,m*n)
        self[false,idx] = 0
        reshape!(*shp,m,n)
      else
        store(triu(k))
      end
    end
def triu!(k=0)
      if ndim < 2
        raise NArray::ShapeError, "must be >= 2-dimensional array"
      end
      if contiguous?
        *shp,m,n = shape
        idx = tril_indices(k-1)
        reshape!(*shp,m*n)
        self[false,idx] = 0
        reshape!(*shp,m,n)
      else
        store(triu(k))
      end
    end
Upper triangular matrix.
 Fill the self elements below the k-th diagonal with zero.