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. Regards, Steve
I am teaching system dynamics, controls, and mechatronics and letting the students choose between matlab and python. I don't know if I have any lessons learned yet. Not many of the students choose python. I think the problem is that getting everything installed seems overwhelming. Enthought python is good, but the packages are slightly old, because everything is in flux. So, I tell my students to install it and then update Numpy/Scipy/Matplotlib. My other problem is that the other faculty don't know python, so Matlab is taught and expected. On 2/27/07, Steven H. Rogers <steve@shrogers.com> 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.
Regards, Steve
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
Thanks Ryan. Matlab _is_ rather pervasive in engineering, but I expect NumPy/SciPy to make inroads as the rough edges are smoothed out. Regards, Steve
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.
I've used NumPy in a Signals and Systems class and in a Probability Theory class. These were both Junior/Senior level undergraduate classes. Students were given the option to use Python or MATLAB. Most chose MATLAB because it was installed on the computers they had access to. It is also the language used when other teachers teach the course. NumPy/SciPy was a complete replacement for MATLAB however. I did all of the labs using NumPy/SciPy and they worked fine. -Travis
On 28-Feb-07, at 5:31 PM, Travis Oliphant wrote:
Students were given the option to use Python or MATLAB. Most chose MATLAB because it was installed on the computers they had access to. It is also the language used when other teachers teach the course.
NumPy/SciPy was a complete replacement for MATLAB however. I did all of the labs using NumPy/SciPy and they worked fine.
Travis, Can I ask how you (or anyone else) deals with saving a "workspace" when doing interactive numerical work in Python? I'd imagine this might be important in an educational setting, and I'm remiss to still be without an equivalent to Matlab's "save" (I understand the difficulty in serializing a Python namespace though). So what do people do? Aside from being somewhat clumsy, even cPickle seems intolerably slow at saving large matrices to disk. David P.S. Many thanks for all the work you've done making NumPy and SciPy usable. I'm currently working on porting a good bit of numerical code to Python and your documentation has been invaluable. By the way, was it you who gave the presentation at the NIPS workshops? (My supervisor came away quite impressed)
David Warde-Farley wrote:
On 28-Feb-07, at 5:31 PM, Travis Oliphant wrote:
Students were given the option to use Python or MATLAB. Most chose MATLAB because it was installed on the computers they had access to. It is also the language used when other teachers teach the course.
NumPy/SciPy was a complete replacement for MATLAB however. I did all of the labs using NumPy/SciPy and they worked fine.
Travis,
Can I ask how you (or anyone else) deals with saving a "workspace" when doing interactive numerical work in Python? I'd imagine this might be important in an educational setting, and I'm remiss to still be without an equivalent to Matlab's "save" (I understand the difficulty in serializing a Python namespace though).
You can save .mat files (which I've done in the past) by passing in a list of the names to save to the file to scipy's scipy.io.savemat function. I've also used scipy's scipy.io.save command with success in the past. The problem with pickling is the copying that occurs to a string before pickling can occur. I think something a little more specialized to NumPy would be possible using the .tofile() method. There has been some nice work on SciPy's io functionality lately which includes using memory-mapping techniques. It has not been completely documented yet, however. -Travis
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
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
Hi Steven, Last year I helped out in teaching some basic programming with no prerequisites to 3rd year undergrad physics students at Monash University. It was really a 1st or 2nd year level course, but we had a wide spectrum of background experience levels - from no programming experience to proficient in C++. To deal with this variation in experience, we created some basic and some more advanced teaching labs. We divided the subject in half, giving a single C lecture first, followed by a few C labs, then a single Python lecture followed by a few Python labs; a deliberately chosen order and obviously very ambitious. Our department is fairly IDL-centric, but Python's advantage of being free and its greater general applicability/flexibility was accepted by the course coordinator as sufficient reason to teach it. The hope is to get continuing 4th year honours students comfortable with a language for their 4th year physics projects. We took the view - shared by colleagues in the Computer Science dept. - that getting the students to struggle with pointers and see the C-syntax would be good for their character :-) and that numpy would allow much higher level tasks to be attempted at an early stage and would get them used to using an array-processing mindset. I think that, since some of the students had prior C experience, they were able to help each other a bit more in the C labs. We found that we were busier answering questions in the Python labs as a result. We had them create arrays in C, populating them with sinc functions to get them to deal with division by zero etc. and repeat the exercise in Python with numpy. We had them do some file i/o in both languages - I used scipy.io read_array and write_array to read data printf'ed by their C code. We did some fft-based filtering with Python and used pylab to view the results. We used Enthought Python with "ipython -pylab" shells and Idle as the editor. One lesson learned is that I tried to be a bit too ambitious with Python - they struggled with trying to figure out how to use functions. The labs were written as a mixture of "modify this example" code and "find the function which does this" - they found the latter too hard because the number of functions in numpy/scipy is a bit overwhelming and not easily navigable for the uninitiated. We'll be re-running this course in a few weeks and perhaps introducing a physics modelling/numerical methods subject (perhaps language-neutral) later in the year. It may also be a prerequisite for some of the 3rd year astronomical data processing labs currently being written. Gary R. 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.
Regards, Steve
participants (7)
-
David Warde-Farley
-
Gary Ruben
-
Michael Williams
-
Ryan Krauss
-
Steven H. Rogers
-
Travis Oliphant
-
Travis Oliphant