Joe Harrington | 1 Mar 2007 01:32
Picon

Re: NumPy in Teaching

Hi Steve,

I have taught Astronomical Data Analysis twice at Cornell using IDL,
and I will be teaching it next Fall at UCF using NumPy.  Though I've
been active here in the recent past, I'm actually not a regular NumPy
user myself yet (I used Numeric experimentally for about 6 months in
1997), so I'm a bit nervous.  There isn't the kind of documentation
and how-to support for Numpy that there is for IDL, though our web
site is a start in that direction.  One thought I've had in making the
transition easier is to put up a syntax and function concordance,
similar to that available for MATLAB.  I thought this existed.  Maybe
Perry can point me to it.  Just adding a column to the MATLAB one
would be fine.

My syllabi (there are undergrad and grad versions) are at:

Cornell courses (undergrad only):
http://physics.ucf.edu/~jh/ast/ast234-2003/
http://physics.ucf.edu/~jh/ast/ast234-2004/

UCF course (4xxx is undergrad, 5xxx is grad, numbers not yet assigned):
http://physics.ucf.edu/~jh/ast/dacourse/

The goal of the course is for students to go out and do research with
faculty as soon as they're done, and be useful enough to be included
on papers.  Rather than the usual (and failing) "just do what I do"
model, in which physics students learn to program badly and in
FORTRAN77 from their professors, I teach programming from a CS point
of view, focusing on good top-down design and bottom-up construction
(indentation, documentation, sensible naming, testing, etc.).  I teach
(Continue reading)

Mark Janikas | 1 Mar 2007 01:39
Favicon

Re: Source install

Thanks Robert,

All good info as usual.  Best wishes,

MJ

-----Original Message-----
From: numpy-discussion-bounces <at> scipy.org
[mailto:numpy-discussion-bounces <at> scipy.org] On Behalf Of Robert Kern
Sent: Wednesday, February 28, 2007 3:32 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Source install

Mark Janikas wrote:
> Thanks Robert,
> 
> Sorry for the incomplete request for help.  The install of numpy seems
> to go fine, but when I import numpy it reports that it is running from
> the source directory. 

Oh, just cd to somewhere else. Otherwise, you will pick up the partial
numpy
package in the source directory that we use to bootstrap the build.

> I assume this has to do with the BLAS/ATLAS stuff
> I have been reading about.  What I am actually trying to do is get
NumPy
> wrapped in the install of our software program.  We currently wrap
> Python2.4 as our scripting language and I need a way to get numpy in
our
(Continue reading)

Steven H. Rogers | 1 Mar 2007 05:14
Favicon

Re: NumPy in Teaching

Hi Joe:

Thanks for the comprehensive response.  I'll post the results to the 
lists when I've compiled them. 

# Steve
Toon Knapen | 1 Mar 2007 08:04
Picon

Re: numpy.dot and ACML

Hi,

I am also looking to verify the vendor-libs being used.

What does numpy.__config__.show() tell you ?

toon

Yves Frederix wrote:
> Hi all,
> 
> I have managed to compile numpy using pathscale and ACML on a 64 bit AMD
> system. Now I wanted to verify that numpy.dot indeed uses the ACML
> libs. The example for dot()
>
(http://www.scipy.org/Numpy_Example_List?highlight=%28example%29#head-c7a573f030ff7cbaea62baf219599b3976136bac)
suggest a way of doing this:
> 
> 	1 u0050015 <at> lo-03-02 .../core $ python -c "import numpy; print id(numpy.dot)==id(numpy.core.multiarray.dot);"
> 	True
> 
> This indicates that I am not using the acml libraries. 
> 
> When running a benchmark (see attach) and comparing to a non-ACML
> installation though, the strange thing is that there is a clear
> speed difference, suggesting again that the acml libraries are indeed
> used.
> 
> Because this is not all that clear to me, I was wondering whether there
> exists an alternative way of verifying what libraries are used.
(Continue reading)

Francesc Altet | 1 Mar 2007 09:14

Re: PyCon 2007

El dc 28 de 02 del 2007 a les 14:03 -0700, en/na Travis Oliphant va
escriure:
> I took the opportunity to go to PyCon this year and met several people 
> there.  I had a really good time although I would have liked to stay 
> longer.   If you want to see the slides for my talk they are here:
> 
> http://us.pycon.org/common/talkdata/PyCon2007/045/PythonTalk.pdf
> 

Excellent presentation. Congratullations Travis!

--

-- 
Francesc Altet    |  Be careful about using the following code --
Carabos Coop. V.  |  I've only proven that it works, 
www.carabos.com   |  I haven't tested it. -- Donald Knuth
Michael Williams | 1 Mar 2007 11:45
Picon
Picon

Re: NumPy in Teaching

On Tue, Feb 27, 2007 at 09:05:58PM -0700, Steven H. Rogers wrote:
> I'm doing an informal survey on the use of Array Programming Languages 
> for teaching.  If you're using NumPy in this manner I'd like to hear 
> from you.  What subject was/is taught, academic level, results, lessons 
> learned, etc.

If Numeric counts, I used that back in 2002 as part of an introductory
programming course I wrote for the Department of Physics at Oxford. We
really only used to to provide an element-wise array method.

Brief introduction: http://pentangle.net/python/pyzine.php

The course (aka "Handbook") and report on the course's successes and
failures: http://pentangle.net/python/

-- Mike
Steven H. Rogers | 1 Mar 2007 15:09
Favicon

Re: [Numpy-discussion] NumPy in Teaching

Thanks Mike:

Michael Williams wrote:
> On Tue, Feb 27, 2007 at 09:05:58PM -0700, Steven H. Rogers wrote:
>   
>> I'm doing an informal survey on the use of Array Programming Languages 
>> for teaching.  If you're using NumPy in this manner I'd like to hear 
>> from you.  What subject was/is taught, academic level, results, lessons 
>> learned, etc.
>>     
>
> If Numeric counts, I used that back in 2002 as part of an introductory
> programming course I wrote for the Department of Physics at Oxford. We
> really only used to to provide an element-wise array method.
>   
Yes, Numeric and Numarray certainly count.    The comments I've received 
about Matlab and IDL are also welcome. 
> Brief introduction: http://pentangle.net/python/pyzine.php
>
> The course (aka "Handbook") and report on the course's successes and
> failures: http://pentangle.net/python/
>
> -- Mike
> ________
# Steve
Steven H. Rogers | 1 Mar 2007 14:53
Favicon

Re: Buffer PEP in NumPy SVN

Travis Oliphant wrote:
> I just wanted to point people to the online version of the PEP.  I'm 
> still looking for comments and suggestions.   The current version is here:
>
> http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/doc/pep_buffer.txt
>
> -Travis
>   
Hi Travis:

I'd like to help, but am not really prepared to comment at this time.  
It does look good at first glance.  I need to review it in greater 
detail along with the current buffer code.  Maybe this weekend.  Do you 
have any kind of target dates that we need to keep in mind for this project?

# Steve
Alan G Isaac | 1 Mar 2007 16:14
Picon
Favicon

Re: [SciPy-user] NumPy in Teaching

On Tue, 27 Feb 2007, "Steven H. Rogers" apparently wrote: 
> I'm doing an informal survey on the use of Array 
> Programming Languages for teaching.  If you're using NumPy 
> in this manner I'd like to hear from you.  What subject 
> was/is taught, academic level, results, lessons learned, 
> etc. 

I'm using NumPy in a PhD level microeconomics course. The 
students are using numpy primarily for the matrix class. In 
the past I have used GAUSS.  Programming is a fairly small 
component of the course.  Although most of the students have 
no programming background, they are finding Python and NumPy 
surprisingly easy to use.

Cheers,
Alan Isaac
Mark P. Miller | 1 Mar 2007 17:03

when and where to use numpy arrays vs nested lists

I've been using Numpy arrays for some work recently.  Just for fun, I 
compared some "representative" code using Numpy arrays and an object 
comprised of nested lists to represent my arrays.  To my surprise, the 
array of nested lists outperformed Numpy in this particular application 
(in my actual code by 10%, results below are more dramatic).

Can anyone shed some insight here?  The functions that I use in reality 
are much more complicated than those listed below, but they are 
nonetheless representative of the type of thing that I'm doing.

##imports
import numpy as NP
from numpy.random import randint

#numpy array code
array1 = NP.zeros((50,50), int)

def random1():
     c = array1(randint(10), randint(10))

t=timeit.Timer("random1()", "from __main__ import random1")
 >>> t.timeit(10000)
0.1085283185432786
 >>> t.timeit(10000)
0.10784806448862128
 >>> t.timeit(10000)
0.1095533091495895

#python 2d array based on nested lists
array2 = []
(Continue reading)


Gmane