MCPcopy Create free account
hub / github.com/numpy/numpy / outer

Function outer

numpy/ma/core.py:7945–7957  ·  view source on GitHub ↗

maskedarray version of the numpy function.

(a, b)

Source from the content-addressed store, hash-verified

7943
7944
7945def outer(a, b):
7946 "maskedarray version of the numpy function."
7947 fa = filled(a, 0).ravel()
7948 fb = filled(b, 0).ravel()
7949 d = np.outer(fa, fb)
7950 ma = getmask(a)
7951 mb = getmask(b)
7952 if ma is nomask and mb is nomask:
7953 return masked_array(d)
7954 ma = getmaskarray(a)
7955 mb = getmaskarray(b)
7956 m = make_mask(1 - np.outer(1 - ma, 1 - mb), copy=False)
7957 return masked_array(d, mask=m)
7958outer.__doc__ = doc_note(np.outer.__doc__,
7959 "Masked values are replaced by 0.")
7960outerproduct = outer

Calls 6

filledFunction · 0.85
getmaskFunction · 0.85
getmaskarrayFunction · 0.85
make_maskFunction · 0.85
ravelMethod · 0.45
outerMethod · 0.45