, b, strict=False, out=None)[source]#

Return the dot product of two arrays.

This function is the equivalent of that takes masked values into account. Note that strict and out are in different position than in the method version. In order to maintain compatibility with the corresponding method, it is recommended that the optional arguments be treated as keyword only. At some point that may be mandatory.

a, bmasked_array_like

Inputs arrays.

strictbool, optional

Whether masked data are propagated (True) or set to 0 (False) for the computation. Default is False. Propagating the mask means that if a masked value appears in a row or column, the whole row or column is considered masked.

outmasked_array, optional

Output argument. This must have the exact kind that would be returned if it was not used. In particular, it must have the right type, must be C-contiguous, and its dtype must be the dtype that would be returned for dot(a,b). This is a performance feature. Therefore, if these conditions are not met, an exception is raised, instead of attempting to be flexible.

New in version 1.10.2.

See also

Equivalent function for ndarrays.


>>> a =[[1, 2, 3], [4, 5, 6]], mask=[[1, 0, 0], [0, 0, 0]])
>>> b =[[1, 2], [3, 4], [5, 6]], mask=[[1, 0], [0, 0], [0, 0]])
>>>, b)
  data=[[21, 26],
        [45, 64]],
  mask=[[False, False],
        [False, False]],
>>>, b, strict=True)
  data=[[--, --],
        [--, 64]],
  mask=[[ True,  True],
        [ True, False]],