hadamard.paley_design

hadamard.paley_design(p, k=1)

Generate a Paley design

Parameters

Name Type Description Default
p int A prime integer required
k int An integer power. Defaults to 1. 1

Returns

Type Description
numpy.numpy.ndarray np.ndarray: A Paley design of order \(n=p^k + 1\). This is equivalent to a saturated orthogonal array \(OA(n,n-1,2,2)\). Design will return with 0 and 1 level codings.

Examples:

import pyLHD
pyLHD.paley_design(p=7)
array([[1, 1, 1, 1, 1, 1, 1],
       [0, 1, 1, 0, 1, 0, 0],
       [0, 0, 1, 1, 0, 1, 0],
       [0, 0, 0, 1, 1, 0, 1],
       [1, 0, 0, 0, 1, 1, 0],
       [0, 1, 0, 0, 0, 1, 1],
       [1, 0, 1, 0, 0, 0, 1],
       [1, 1, 0, 1, 0, 0, 0]], dtype=int16)