![](https://secure.gravatar.com/avatar/b33b7ab83cbfee0d246e10455b7ee811.jpg?s=120&d=mm&r=g)
I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy? Thanks, Linda
![](https://secure.gravatar.com/avatar/477281aad22e2e3ba0d5b92e4491caf0.jpg?s=120&d=mm&r=g)
Some Numeric functionality can be obtained as follows: The old Numeric routine names and behavior for functions in the add-on packages UserArray, Matrix, MLab, LinearAlgebra, FFT, RandomArray, RNG and RNG.Statistics have been moved to numpy.oldnumeric.<pkg> where <pkg> is user_array, matrix, mlab, linear_algebra, fft, random_array, rng, and rng_stats respectively Hope this helps Cheers Chris -----Original Message----- From: scipy-user-bounces@scipy.org on behalf of linda.s Sent: Sun 11/4/2007 11:08 AM To: SciPy Users List Subject: [SciPy-user] about MLab I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy? Thanks, Linda _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/b33b7ab83cbfee0d246e10455b7ee811.jpg?s=120&d=mm&r=g)
numpy.oldnumeric.mlab Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'oldnumeric'
On Nov 4, 2007 3:06 AM, <C.J.Lee@tnw.utwente.nl> wrote:
Some Numeric functionality can be obtained as follows:
The old Numeric routine names and behavior for functions in the add-on packages UserArray, Matrix, MLab, LinearAlgebra, FFT, RandomArray, RNG and RNG.Statistics have been moved to numpy.oldnumeric.<pkg> where <pkg> is user_array, matrix, mlab, linear_algebra, fft, random_array, rng, and rng_stats respectively
Hope this helps Cheers Chris
-----Original Message----- From: scipy-user-bounces@scipy.org on behalf of linda.s Sent: Sun 11/4/2007 11:08 AM To: SciPy Users List Subject: [SciPy-user] about MLab
I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy? Thanks, Linda _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/477281aad22e2e3ba0d5b92e4491caf0.jpg?s=120&d=mm&r=g)
I would guess that means you have an incomplete install of numpy. Check that in the site-packages directory that numpy/oldnumeric/mlab.py exists. If it doesn't then you need to reinstall numpy I can't check on my linux or windows machine right now, but it certainly works on my Mac OS X box Cheers Chris -----Original Message----- From: scipy-user-bounces@scipy.org on behalf of linda.s Sent: Sun 11/4/2007 12:33 PM To: SciPy Users List Subject: Re: [SciPy-user] about MLab
numpy.oldnumeric.mlab Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'oldnumeric'
On Nov 4, 2007 3:06 AM, <C.J.Lee@tnw.utwente.nl> wrote:
Some Numeric functionality can be obtained as follows:
The old Numeric routine names and behavior for functions in the add-on packages UserArray, Matrix, MLab, LinearAlgebra, FFT, RandomArray, RNG and RNG.Statistics have been moved to numpy.oldnumeric.<pkg> where <pkg> is user_array, matrix, mlab, linear_algebra, fft, random_array, rng, and rng_stats respectively
Hope this helps Cheers Chris
-----Original Message----- From: scipy-user-bounces@scipy.org on behalf of linda.s Sent: Sun 11/4/2007 11:08 AM To: SciPy Users List Subject: [SciPy-user] about MLab
I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy? Thanks, Linda _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/39916bae984cb93b797efd2b175f59c0.jpg?s=120&d=mm&r=g)
On Sun, 4 Nov 2007, "linda.s" apparently wrote:
numpy.oldnumeric.mlab Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'oldnumeric'
from numpy.oldnumeric import mlab
hth, Alan Isaac
![](https://secure.gravatar.com/avatar/40489da22d2dc0cc12596420bb810463.jpg?s=120&d=mm&r=g)
linda.s wrote:
I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy?
You should also read the first chapters of the book "Guide to NumPy" which are available on-line for immediate download. There is a comprehensive description of the differences between Numeric and NumPy as well as tips for compatibility. You must also import numpy.oldnumeric before it is available. import numpy.oldnumeric numpy.oldnumeric.mlab You will notice that the module is simple a re-naming module. All of the functionality is in numpy but under possibly different names. All functions in Numeric are available in NumPy (as far as I know). If you encounter a situation where that is not true, please let me know. -Travis
![](https://secure.gravatar.com/avatar/b33b7ab83cbfee0d246e10455b7ee811.jpg?s=120&d=mm&r=g)
On 11/4/07, Travis E. Oliphant <oliphant@enthought.com> wrote:
linda.s wrote:
I have quite a few codes written in Numeric. MLab comes with Numeric too. I got confused when I began to use numpy because it does not have MLab and does not have some same functions in Numeric. is there any smooth way to change the code developed in Numeric to numpy?
You should also read the first chapters of the book "Guide to NumPy" which are available on-line for immediate download. There is a comprehensive description of the differences between Numeric and NumPy as well as tips for compatibility.
You must also import numpy.oldnumeric before it is available.
import numpy.oldnumeric
numpy.oldnumeric.mlab
You will notice that the module is simple a re-naming module. All of the functionality is in numpy but under possibly different names.
All functions in Numeric are available in NumPy (as far as I know). If you encounter a situation where that is not true, please let me know.
-Travis
I still have the problem such as:
import numpy numpy.oldnumeric.mlab Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'oldnumeric' I use Mac machine and did download and install Scipy...
Linda
![](https://secure.gravatar.com/avatar/b33b7ab83cbfee0d246e10455b7ee811.jpg?s=120&d=mm&r=g)
On 11/7/07, Alan G Isaac <aisaac@american.edu> wrote:
On Wed, 7 Nov 2007, "linda.s" apparently wrote:
I still have the problem such as:
import numpy numpy.oldnumeric.mlab
That is incorrect. Apparently you missed my post:
from numpy.oldnumeric import mlab
hth, Alan Isaac
Thanks, Linda
![](https://secure.gravatar.com/avatar/40489da22d2dc0cc12596420bb810463.jpg?s=120&d=mm&r=g)
Alan G Isaac wrote:
On Wed, 7 Nov 2007, "linda.s" apparently wrote:
I still have the problem such as:
import numpy numpy.oldnumeric.mlab
That is incorrect. Apparently you missed my post:
from numpy.oldnumeric import mlab
You need to import oldnumeric specifically (it is not loaded by default). import numpy.oldnumeric Then, you will have numpy.oldnumeric.mlab -Travis
participants (4)
-
Alan G Isaac
-
C.J.Lee@tnw.utwente.nl
-
linda.s
-
Travis E. Oliphant