![](https://secure.gravatar.com/avatar/f71f5b898ff50fe74a20646643b50795.jpg?s=120&d=mm&r=g)
thanks. I'll try that. I'm currently coding in matlab to simulate 1D steady state fluid dynamics problems, and considering the switch to python/scipy. Key issues of concern: 1) can matrices/vectors be handled in the same way (this is the power of matlab of course). eg. the matlab 'dot' notation which operates element by element on matrices. using vectors greatly speeds up code over for loops and makes it more compact. 2) matlab has extremely powerful plotting facilities 3) object orientation. Actually I think python might excel here. I get a bit frustrated with matlab objects (no passing by reference, for example). 4) creation of executables/binaries-- should be okay Do you or anyone have any comments on these points? Dave ________________________________ From: scipy-user-bounces@scipy.net [mailto:scipy-user-bounces@scipy.net] On Behalf Of Ryan Krauss Sent: 13 July 2005 13:41 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Dave, I actually get the same thing. I know it can be frustrating to try new software and have it not work completely out of the box. At this point in the installation, someone recommended to me to switch to Ipython and matplotlib. That is what I have done and I am quite happy with it. Ryan Howey, David A wrote: I've now installed wxpython, and sadly get: import gui_thread gui_thread.start() Traceback (most recent call last): File "<pyshell#1>", line 1, in -toplevel- gui_thread.start() File "C:\Python23\Lib\site-packages\gui_thread\__init__.py", line 73, in start wxPython_thread() File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 160, in wxPython_thread sys.modules[name] = wrap_extmodule(module,call_holder) File "C:\Python23\Lib\site-packages\gui_thread\wxPython_thread.py", line 61, in wrap_extmodule raise NotImplementedError,`t` NotImplementedError: <type 'PyCObject'> Perhaps I've done something wrong? Dave -----Original Message----- From: scipy-user-bounces@scipy.net [mailto:scipy-user-bounces@scipy.net] On Behalf Of Brice Thurin Sent: 13 July 2005 13:12 To: SciPy Users List Subject: Re: [SciPy-user] wxpython Hi, I had some trouble in the past as well using gui_thread and someone recommend me to use matplotlib (http://matplotlib.sourceforge.net). Otherwise, wxpython allows you to play with gui and can be find here: (http://www.wxpython.org). Brice _______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/3c656b2f9d93da24e6217542e3bdfa89.jpg?s=120&d=mm&r=g)
On 13-Jul-05, at 8:45 AM, Howey, David A wrote:
1) can matrices/vectors be handled in the same way (this is the power of matlab of course). eg. the matlab 'dot' notation which operates element by element on matrices. using vectors greatly speeds up code over for loops and makes it more compact.
The situation is the reverse in SciPy. A multiplication of two SciPy array objects defaults to an element-by-element multiplication (dot notation in MATLAB, .*, ./ etc.). If you want to do linear algebra in SciPy, you have to explicitly specify a Matrix object. In [1]: from SciPy import mat numerix Numeric 24.0b2 In [2]: a = mat('[1 2; 3 4]') In [3]: a Matrix([[1, 2], [3, 4]]) In [4]: a.T Matrix([[1, 3], [2, 4]])
2) matlab has extremely powerful plotting facilities
I haven't been able to do any plotting with SciPy or Python yet because of an installation problem on my Mac OS X machine. And I admit, MATLAB does have a very usable plotting system.
3) object orientation. Actually I think python might excel here. I get a bit frustrated with matlab objects (no passing by reference, for example).
IMHO, MATLAB's object-oriented features are actually a bit of a hack compared to Python's. Python passes lists, dicts, objects by reference, so if one wants to pass a copy, one actually has to explicitly do a copy/slice. But interestingly, there are many nuances: http://tinyurl.com/78mf8
4) creation of executables/binaries-- should be okay
On the Win32 platform there is py2exe, and Python is standard on many Unices including Mac OS X. I've know a MATLAB compiler exists, but I haven't used it. Zhiwen -- "If the women don't find you handsome, they should at least find you handy." - Red Green
![](https://secure.gravatar.com/avatar/5a7d8a4d756bb1f1b2ea729a7e5dcbce.jpg?s=120&d=mm&r=g)
Zhiwen Chong wrote:
On 13-Jul-05, at 8:45 AM, Howey, David A wrote:
1) can matrices/vectors be handled in the same way (this is the power of matlab of course). eg. the matlab 'dot' notation which operates element by element on matrices. using vectors greatly speeds up code over for loops and makes it more compact.
The situation is the reverse in SciPy. A multiplication of two SciPy array objects defaults to an element-by-element multiplication (dot notation in MATLAB, .*, ./ etc.). If you want to do linear algebra in SciPy, you have to explicitly specify a Matrix object.
Just to note that if you want to use normal numeric arrays, and occasionally need to multiply them as matrices, you can use dot(A,B) without having to turn them into Matrix objects. It's a function call and not an operator, but it may serve better some usage cases where having a Matrix object is unwieldy for other reasons (I personally never use Matrix). Cheers, f
participants (4)
-
Fernando Perez
-
Howey, David A
-
Ryan Krauss
-
Zhiwen Chong