Chi2fit.Matrix.from_diagonal

You're seeing just the function from_diagonal, go back to Chi2fit.Matrix module for more information.

Specs

from_diagonal(vector()) :: matrix()

Returns a matrix with the supplied vector as its diagonal elements.

Examples

iex> from_diagonal [1,5,9]
[[1, 0, 0], [0, 5, 0], [0, 0, 9]]