Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread S Python
> Another reason not to use "from xx import *" is that it can make it > very difficult to discover where a name is defined. If you have > several "from xx import *" lines and then later you use a function > "foo()" there is no easy way to tell which module foo came from. > > An alternative is to li

Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread Kent Johnson
On Fri, Aug 8, 2008 at 1:25 PM, Timothy Grant <[EMAIL PROTECTED]> wrote: > In general "from import *" is a very bad idea. > > import imports a module into its own namespace (e.g., to > access its functionality you would have to do ".foo() and > .bar()" The form that you chose to use imports all

Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread S Python
> In general "from import *" is a very bad idea. > > import imports a module into its own namespace (e.g., to > access its functionality you would have to do ".foo() and > .bar()" The form that you chose to use imports all of a > module's contents into the current namespace. This means you can ca

Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread Timothy Grant
On Fri, Aug 8, 2008 at 9:29 AM, S Python <[EMAIL PROTECTED]> wrote: >> No, they are not the same. Numeric is older; NumArray is another older >> package. You should use Numpy if you can. >> http://numpy.scipy.org/#older_array >> > >> >> Now you should be able to import numpy. >> >> Kent >> > > Tha

Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread S Python
> No, they are not the same. Numeric is older; NumArray is another older > package. You should use Numpy if you can. > http://numpy.scipy.org/#older_array > > > Now you should be able to import numpy. > > Kent > Thanks, Kent. I ended up using: >>> from numpy import * I wasn't sure what the diff

Re: [Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread Kent Johnson
On Fri, Aug 8, 2008 at 11:56 AM, S Python <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > I would like to create a two-dimensional array but am confused as to > how to go about it. > > I've read about Numeric Python and Numpy. Are they one and the same? No, they are not the same. Numeric is older;

[Tutor] Confused about "import Numeric" vs "import numpy" for Arrays

2008-08-08 Thread S Python
Hi Everyone, I would like to create a two-dimensional array but am confused as to how to go about it. I've read about Numeric Python and Numpy. Are they one and the same? Also, how do I install them? I am working on a Windows machine. I've been getting the following error messages: >>> import