Sections
Module
bin_mat()
Creates array of all combinations of [+/-1, +/-1, ...].
[+/-1, +/-1, ...]
n (int) – Number of indices.
Output array.
ndarray
Example
>>> bin_mat(2) array([[ 1, -1], [ 1, 1]]) >>> bin_mat(4) array([[ 1, -1, -1, -1], [ 1, -1, -1, 1], [ 1, -1, 1, -1], [ 1, -1, 1, 1], [ 1, 1, -1, -1], [ 1, 1, -1, 1], [ 1, 1, 1, -1], [ 1, 1, 1, 1]])