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

Method __mul__

numpy/matrixlib/defmatrix.py:216–222  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

214 return out
215
216 def __mul__(self, other):
217 if isinstance(other, (N.ndarray, list, tuple)) :
218 # This promotes 1-D vectors to row vectors
219 return N.dot(self, asmatrix(other))
220 if isscalar(other) or not hasattr(other, '__rmul__') :
221 return N.dot(self, other)
222 return NotImplemented
223
224 def __rmul__(self, other):
225 return N.dot(other, self)

Callers

nothing calls this directly

Calls 3

isscalarFunction · 0.90
asmatrixFunction · 0.85
dotMethod · 0.80

Tested by

no test coverage detected