comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL inverse matrix problem??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL inverse matrix problem?? [message #90081 is a reply to message #90078] Fri, 23 January 2015 10:56 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Friday, January 23, 2015 at 11:32:44 AM UTC-7, Amin Farhang wrote:
> Dear Chris,
>
> I wonder that why IDL could not handle this, therefore check the inversion with matlab and Python but both of them return correct values. I think it is necessary that IDL developers consider this kind of issues, since I'm seeing that the Astronomer's community are slowly shift to Python or other languages.
>
> Best,

Amin,

I just tried your original matrix, and it didn't work in Python. For example, here's IDL:

IDL> m1 = 9.5d15 + 0.5d18*randomu(1,1,5,/double)
IDL> m2 = -1d0 + 2d0*randomu(2,5,1,/double)
IDL> Am = m1 ## m2
IDL> result = LA_INVERT(Am)
% LA_INVERT: Singular matrix encountered, STATUS=5.
% Execution halted at: $MAIN$

Now let's try the Python numpy.linalg package:
IDL> linalg = Python.Import('numpy.linalg')
IDL> result = linalg.inv(Am)
% PYTHON_CALLMETHOD: Exception: Singular matrix.
% Execution halted at: $MAIN$

Could you please post an example of a small matrix that works in Python but not in IDL?

Thanks!
-Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HASH assignment
Next Topic: saving an output from the find.pro script

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:11:30 PDT 2025

Total time taken to generate the page: 0.00463 seconds