Hi all,
I need eigen values and vectors for symmetric matrices (like VCV).
Solving with numarray and testing the results, I've got
strange results - input and output matrices of some sizes are
very different. That's an example of differencies:
Size MaxDif(E.Val) MaxDif(E.Vect)
2 0 1.110223e-016
3 1.776357e-015 2.053913e-015
10 1.221245e-015 7.255307e-014
11 3.552714e-015 0.8455322
12 1.526557e-016 1.345035e-013
13 8.881784e-016 0.7796273
14 2.775558e-016 0.7504375
15 2.331468e-015 2.045031e-013
This is for numarray 0.7 on W2K.
I hoped to have all the differencies below 1e-15 or so.
What's wrong ? Program text is below.
Thanks,
Eugene Druker
import numarray, numarray.linear _algebra
EigenVectors = numarray.linear _algebra.eigenv ectors
Multiply = numarray.matrix multiply
Zeros = numarray.zeros
Transpose = numarray.transp ose
def makeCovMat(size ):
covmat = Zeros((size,siz e),'f8')
d,t = 0.9,0.8
for i in xrange(size):
v = covmat[i,i] = d
for j in xrange(i+1,size ):
v *= t
covmat[i,j] = covmat[j,i] = v
return covmat
print 'Size MaxDif(E.Val) MaxDif(E.Vect)'
for size in [2,3]+range(10,24):
covmat = makeCovMat(size )
eval,evec = EigenVectors(co vmat)
# Test S = V L V'
mdiag = Zeros((size,siz e),'f8') # L
for j in xrange(size):
mdiag[j,j] = eval[j]
testmat = Multiply(Transp ose(evec),Multi ply(mdiag,evec) )
ival,ivec = EigenVectors(te stmat)
print ' %3d %-14.7g %-14.7g' % \
(size, (eval-ival).max(), (evec-ivec).max()) 1 2821 eu***********@y ahoo.com (Eugene Druker) writes: I need eigen values and vectors for symmetric matrices (like VCV). Solving with numarray and testing the results, I've got strange results - input and output matrices of some sizes are
[...]
You'll probably be much better off posting this to whichever mailing
list the numarray people use. Google for it. HTH
John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RJS |
last post by:
Hi all,
I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32-
py2.2).
Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222.
In the sample below, commenting out "import numarray" allows the exe to
run. Left in, I get "4.exe has generated errors" etc.
I'm going around and around and there isn't much on Google.
py2exe output is last.
|
by: Alexander Schwaigkofler |
last post by:
Hi!
I have the following problem with numarray. I read the install.txt manual,
but it doesn't already work.
OS: Microsoft Windows 2000
python: Python 2.2.3 (#42, May 30 2003, 18:12:08) on
win32
numarray: Version 0.7
the output from the installation (by hand) you can see below:
|
by: Marco Bubke |
last post by:
Hi
I have tried to include numarray in Pyrex but I get allways
this error:
Traceback (most recent call last):
File "gears.py", line 9, in ?
import gl
File "/home/marco/projects/test_pyrex/gl.pyx", line 40, in gl
ctypedef class numarray.NumArray :
|
by: Marco Bubke |
last post by:
Hi
Ok, I get a reproduceable seqmentation fault.
Ok, fist the code:
cdef NumArray array_to_double(NumArray array):
# maybe here is memoty leak!
cdef NumArray flat_array_obj
flat_array_obj = NA_InputArray(NA_updateDataPtr(array), tFloat64,
|
by: Marc Schellens |
last post by:
Following the NumPy documentation, I took over some C code,
but run into an error.
Does anybody have a suggestion?
Thanks,
marc
gdlpython.cpp:225: `PyArray_Type' undeclared (first use this function)
#include <python2.3/Python.h>
| |
by: andrewfelch |
last post by:
Below is the code to/from Boolean arrays and Unsigned integers. On my
Pentium 4, functions such as "bitwise_and" are 32 times faster when run
on 32-bit integers instead of the entire-byte-consuming-Boolean.
Good luck all:-)
uint32Mask =
numarray.array(, numarray.UInt32)
uint32MaskInner = numarray.copy.deepcopy(uint32Mask)
uint32MaskInner.shape =
|
by: robert |
last post by:
just a note - some speed comparisons :
0.60627370238398726
0.42836673376223189
0.36965815487747022
0.016557970357098384
0.15692469294117473
0.01951756438393204
|
by: Christian Convey |
last post by:
I need to bang out an image processing library (it's schoolwork, so I
can't just use an existing one). But I see three libraries competing
for my love: numpy, numarray, and numeric.
Can anyone recommend which one I should use? If one is considered the
officially blessed one going forward, that would be my ideal.
Thanks,
Christian
|
by: Jedora |
last post by:
Hi all,
I want to write a C program to compute eigenvalues and eigenvectors.
But the matrix is a complex matrix which has all complex numbers. Like
this:
5.8751 5.8774 + 1.5423i 2.0818 + 2.8963i 1.8692 +
1.9634i
5.8774 - 1.5423i 6.8258 2.6390 + 2.8255i 2.2955 +
1.9349i
2.0818 - 2.8963i 2.6390 - 2.8255i 3.9534 2.9155 -
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |