(self, other)
| 219 | return out |
| 220 | |
| 221 | def __mul__(self, other): |
| 222 | if isinstance(other, (N.ndarray, list, tuple)): |
| 223 | # This promotes 1-D vectors to row vectors |
| 224 | return N.dot(self, asmatrix(other)) |
| 225 | if isscalar(other) or not hasattr(other, '__rmul__'): |
| 226 | return N.dot(self, other) |
| 227 | return NotImplemented |
| 228 | |
| 229 | def __rmul__(self, other): |
| 230 | return N.dot(other, self) |