def _check_inputs(z, m):
try:<EOL><INDENT>nz = len(z)<EOL>z = np.array(z)<EOL><DEDENT>except TypeError:<EOL><INDENT>z = np.array([z])<EOL>nz = len(z)<EOL><DEDENT>try:<EOL><INDENT>nm = len(m)<EOL>m = np.array(m)<EOL><DEDENT>except TypeError:<EOL><INDENT>m = np.array([m])<EOL>nm = len(m)<EOL><DEDENT>if (z < <NUM_LIT:0>).any() or (m < <NUM_LIT:0>).any():<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if nz != nm and nz > <NUM_LIT:1> and nm > <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>if type(z) != np.ndarray:<EOL><INDENT>z = np.array(z)<EOL><DEDENT>if type(m) != np.ndarray:<EOL><INDENT>m = np.array(m)<EOL><DEDENT>return z, m<EOL><DEDENT>
Check inputs are arrays of same length or array and a scalar.