dpnp.fill_diagonal

dpnp.fill_diagonal(x1, val, wrap=False)[source]

Fill the main diagonal of the given array of any dimensionality.

For full documentation refer to numpy.fill_diagonal.

Limitations

Parameter wrap is supported only with default values.

See also

dpnp.diag_indices

Return the indices to access the main diagonal of an array.

dpnp.diag_indices_from

Return the indices to access the main diagonal of an n-dimensional array.