MCPcopy Index your code
hub / github.com/numpy/numpy / outer

Method outer

numpy/ma/core.py:1138–1161  ·  view source on GitHub ↗

Return the function applied to the outer product of a and b.

(self, a, b)

Source from the content-addressed store, hash-verified

1136 return masked_tr
1137
1138 def outer(self, a, b):
1139 """
1140 Return the function applied to the outer product of a and b.
1141
1142 """
1143 (da, db) = (getdata(a), getdata(b))
1144 d = self.f.outer(da, db)
1145 ma = getmask(a)
1146 mb = getmask(b)
1147 if ma is nomask and mb is nomask:
1148 m = nomask
1149 else:
1150 ma = getmaskarray(a)
1151 mb = getmaskarray(b)
1152 m = umath.logical_or.outer(ma, mb)
1153 if (not m.ndim) and m:
1154 return masked
1155 if m is not nomask:
1156 np.copyto(d, da, where=m)
1157 if not d.shape:
1158 return d
1159 masked_d = d.view(get_masked_subclass(a, b))
1160 masked_d._mask = m
1161 return masked_d
1162
1163 def accumulate(self, target, axis=0):
1164 """Accumulate `target` along `axis` after filling with y fill

Callers

nothing calls this directly

Calls 6

getdataFunction · 0.85
getmaskFunction · 0.85
getmaskarrayFunction · 0.85
get_masked_subclassFunction · 0.85
outerMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected