bundles / scipy 1.17.1 / scipy / linalg / _special_matrices / hadamard
function
scipy.linalg._special_matrices:hadamard
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: intThe order of the matrix.
nmust be a power of 2.dtype: dtype, optionalThe data type of the array to be constructed.
Returns
H: (n, n) ndarrayThe Hadamard matrix.
Notes
Examples
from scipy.linalg import hadamard hadamard(2, dtype=complex) hadamard(4)✓
Aliases
-
scipy.linalg.hadamard