[SciPy-dev] Optimization
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Tue Nov 29 02:53:10 CST 2005
Hi all,
How can I find the minimizer of
trace[(Y^T A Y) (Y^T Y)^{-1}],
where Y is full-rank n \times p and A is a given symmetric n \times n
matrix.
p > 1 yields
File "/usr/lib/python2.4/site-packages/scipy/optimize/optimize.py",
line 179, in fmin
raise ValueError, "Initial guess must be a scalar or rank-1 sequence."
ValueError: Initial guess must be a scalar or rank-1 sequence.
p=1
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/scipy/linalg/basic.py", line
183, in inv
raise ValueError, 'expected square matrix'
ValueError: expected square matrix
linalg.inv(mat(2)) gives array([[ 0.5]])
linalg.inv(2) should also return 0.5
Nils
More information about the Scipy-dev
mailing list