<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Den 04.03.2011 14:55, skrev Sturla Molden:
<blockquote cite="mid:4D70EF57.5030402@molden.no" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
<br>
We can do this with Python lists of NumPy arrays as well, avoiding
stacking the arrays in a 2D structure:<br>
<br>
[np.dot(u,v.T) for u,v in zip(U,V)]<br>
<br>
</blockquote>
Damn it, bad style. Inner product, not outer...<br>
<br>
[np.dot(u.T,v) for u,v in zip(U,V)]<br>
<br>
or just <br>
<br>
[np.dot(u,v) for u,v in zip(U,V)]<br>
<br>
While it does not matter for 1D vectors, it would for rank 1 x n
matrices.<br>
<br>
<br>
Sturla<br>
<br>
<br>
</body>
</html>