def outer(a, b):
fa = filled(a, <NUM_LIT:0>).ravel()<EOL>fb = filled(b, <NUM_LIT:0>).ravel()<EOL>d = np.outer(fa, fb)<EOL>ma = getmask(a)<EOL>mb = getmask(b)<EOL>if ma is nomask and mb is nomask:<EOL><INDENT>return masked_array(d)<EOL><DEDENT>ma = getmaskarray(a)<EOL>mb = getmaskarray(b)<EOL>m = make_mask(<NUM_LIT:1> - np.outer(<NUM_LIT:1> - ma, <NUM_LIT:1> - mb), copy=<NUM_LIT:0>)<EOL>return masked_array(d, mask=m)<EOL>
maskedarray version of the numpy function.