jax-js
    Preparing search index...
    • Return an array with ones on and below the diagonal and zeros elsewhere.

      If k is provided, it specifies the sub-diagonal on and below which the array is filled with ones. k=0 is the main diagonal, k<0 is below it, and k>0 is above it.

      Parameters

      • n: number
      • Optionalm: number
      • k: number = 0
      • __namedParameters: { device?: Device; dtype?: DType } = {}

      Returns Array