magpack.structures.checkerboard#

checkerboard(shape)#

Creates a checkerboard array of alternating +1 and -1 for the given shape.

Parameters:
shapetuple of int

Shape of the checkerboard.

Returns:
np.ndarray

Array of alternating +1 and -1 for the given shape.