{ } Raw JSON

bundles / scipy latest / scipy / linalg / _special_matrices / hadamard

function

scipy.linalg._special_matrices:hadamard

source: /scipy/linalg/_special_matrices.py :230

Signature

def   hadamard ( n dtype = <class 'int'> )

Summary

Construct an Hadamard matrix.

Extended Summary

Constructs an n-by-n Hadamard matrix, using Sylvester's construction. n must be a power of 2.

Parameters

n : int

The order of the matrix. n must be a power of 2.

dtype : dtype, optional

The data type of the array to be constructed.

Returns

H : (n, n) ndarray

The Hadamard matrix.

Notes

Examples

from scipy.linalg import hadamard
hadamard(2, dtype=complex)
hadamard(4)

Aliases

  • scipy.linalg.hadamard