Thanks to both for your answers and excuse me for being so slow in my reply,
I've been quite busy lately.
Stephen:
I didn't know you could calculate minors that way, thanks for the tip.
Anyway, it looks like it's not the most efficient way of calculating them.
I also think a minor() function should be included in numpy.
Archibald:
I've built two python functions, but I was not able to write them with just
indexing, I had to use hstack and vstack also. Here are the functions
from numpy import *
def erase(array,row,column):
return vstack((hstack((array[:row,:column],
array[:row,column+1:])),
hstack((array[row+1:,:column],
array[row+1:,column+1:]))))
def minor(array,index):
return linalg.det(erase(array,index,index))
Is it possible to avoid using hstack and vstack in erase(), it looks like
there must be an easier way of doing the same thing.
Anyway, in my opinion, both functions are homemade workarounds for things
that should be included in numpy.
Armando Serrano.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20061028/c5b03008/attachment.html