[Matrix-SIG] Release 7
Charles G Waldman
cgw@pgt.com
Mon, 21 Dec 1998 14:52:33 -0500 (EST)
Paul F. Dubois writes:
>
> At ftp://ftp-icf.llnl.gov/pub/python, LLNLPython.tgz and NumPy.exe now point
> to release 7.
I just downloaded this to see if it fixes some of the core-dumps I've
been getting. I notice that the indentation in Lib/Numeric.py around
line 171 is badly messed up... here's a patch.
--- Numeric.py.orig Mon Dec 21 14:02:01 1998
+++ Numeric.py Mon Dec 21 14:49:54 1998
@@ -168,23 +168,23 @@
new_axes [0:0] = [axis1, axis2]
a = transpose (a, new_axes)
s = a.shape
- if len (s) == 2:
- n1 = s [0]
- n2 = s [1]
- n = n1 * n2
- s = (n,) + s [2:]
- a = reshape (a, s)
- if offset < 0:
- offset = - n2 * offset
- last = n
- else:
- last = n - n2 * offset
- return take (a, range (offset, last, n2 + 1), 0)
- else :
- my_diagonal = []
- for i in range (s [0]) :
- my_diagonal.append (diagonal (a [i], offset))
- return array (my_diagonal)
+ if len (s) == 2:
+ n1 = s [0]
+ n2 = s [1]
+ n = n1 * n2
+ s = (n,) + s [2:]
+ a = reshape (a, s)
+ if offset < 0:
+ offset = - n2 * offset
+ last = n
+ else:
+ last = n - n2 * offset
+ return take (a, range (offset, last, n2 + 1), 0)
+ else :
+ my_diagonal = []
+ for i in range (s [0]) :
+ my_diagonal.append (diagonal (a [i], offset))
+ return array (my_diagonal)
def trace(a, offset=0, axis1=0, axis2=1):