def power(a, b, third=None):
if third is not None:<EOL><INDENT>raise MaskError("<STR_LIT>")<EOL><DEDENT>ma = getmask(a)<EOL>mb = getmask(b)<EOL>m = mask_or(ma, mb)<EOL>fa = getdata(a)<EOL>fb = getdata(b)<EOL>if isinstance(a, MaskedArray):<EOL><INDENT>basetype = type(a)<EOL><DEDENT>else:<EOL><INDENT>basetype = MaskedArray<EOL><DEDENT>with np.errstate(divide='<STR_LIT:ignore>', invalid='<STR_LIT:ignore>'):<EOL><INDENT>result = np.where(m, fa, umath.power(fa, fb)).view(basetype)<EOL><DEDENT>result._update_from(a)<EOL>invalid = np.logical_not(np.isfinite(result.view(ndarray)))<EOL>if m is not nomask:<EOL><INDENT>if not (result.ndim):<EOL><INDENT>return masked<EOL><DEDENT>result._mask = np.logical_or(m, invalid)<EOL><DEDENT>if invalid.any():<EOL><INDENT>if not result.ndim:<EOL><INDENT>return masked<EOL><DEDENT>elif result._mask is nomask:<EOL><INDENT>result._mask = invalid<EOL><DEDENT>result._data[invalid] = result.fill_value<EOL><DEDENT>return result<EOL>
Returns element-wise base array raised to power from second array.

This is the masked array version of `numpy.power`. For details see
`numpy.power`.

See Also
--------
numpy.power

Notes
-----
The *out* argument to `numpy.power` is not supported, `third` has to be
None.