def _burkardt_13_power(n, p):
<EOL>if n != int(n) or n < <NUM_LIT:2>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>n = int(n)<EOL>if p != int(p) or p < <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>p = int(p)<EOL>a, b = divmod(p, n)<EOL>large = np.power(<NUM_LIT>, -n*a)<EOL>small = large * np.power(<NUM_LIT>, -n)<EOL>return np.diag([large]*(n-b), b) + np.diag([small]*b, b-n)<EOL>
A helper function for testing matrix functions.

Parameters
----------
n : integer greater than 1
    Order of the square matrix to be returned.
p : non-negative integer
    Power of the matrix.

Returns
-------
out : ndarray representing a square matrix
    A Forsythe matrix of order n, raised to the power p.