cratepy.tensor.tensoroperations.dd

dd(i, j)[source]

Kronecker delta function.

\[\begin{split}\delta_{ij} = \begin{cases} 1, & \text{if } i=j, \\ 0, & \text{if } i\neq j. \end{cases}\end{split}\]

Parameters:
  • i (int) – First index.

  • j (int) – Second index.

Returns:

value – Kronecker delta.

Return type:

int (0 or 1)