Posts

2014-10-12: Ebola numbers

2014-09-23: More stochastic than?

2014-08-17: Feynman's missing method for third-orders?

2014-07-31: CIA spies even on congress

2014-07-16: Rehm on vaccines

2014-06-21: Kurtosis, 4th order diffusion, and wave speed

2014-06-20: Random dispersal speeds invasions

2014-05-06: Preservation of information asymetry in Academia

2014-04-16: Dual numbers are really just calculus infinitessimals

2014-04-14: More on fairer markets

2014-03-18: It's a mad mad mad mad prisoner's dilemma

2014-03-05: Integration techniques: Fourier--Laplace Commutation

2014-02-25: Fiber-bundles for root-polishing in two dimensions

2014-02-17: Is life a simulation or a dream?

2014-01-30: PSU should be infosocialist

2014-01-12: The dark house of math

2014-01-11: Inconsistencies hinder pylab adoption

2013-12-24: Cuvier and the birth of extinction

2013-12-17: Risk Resonance

2013-12-15: The cult of the Levy flight

2013-12-09: 2013 Flu Shots at PSU

2013-12-02: Amazon sucker-punches 60 minutes

2013-11-26: Zombies are REAL, Dr. Tyson!

2013-11-22: Crying wolf over synthetic biology?

2013-11-21: Tilting Drake's Equation

2013-11-18: Why $1^\infty != 1$

2013-11-15: Adobe leaks of PSU data + NSA success accounting

2013-11-14: 60 Minutes misreport on Benghazi

2013-11-11: Making fairer trading markets

2013-11-10: L'Hopital's Rule for Multidimensional Systems

2013-11-09: Using infinitessimals in vector calculus

2013-11-08: Functional Calculus

2013-11-03: Elementary mathematical theory of the health poverty trap

2013-11-02: Proof of the area of a circle using elementary methods

Inconsistencies hinder pylab adoption

As I prepare for my semesters teaching, I'm reminded of why I don't like teaching students python as a numerical calculation tool. Personally, I am very happy with python, and use it all the time. But I had allot of languages under my belt already when I learned it, which was well before numpy came into existence. Now, it's create to see things like Canopy emerging. But, if we really want it to accessible as a learning tool, we can leave huge sinkholes in the road of learning.

My complaint is that there is some simple but common inconsistencies that I mess up all the time in scipy, and will cause unnecessary nightmares for my students. Specifically, array size is not specified consistently accross pylab. If you want to create a random 2x2 array, you call randn(2,2). But if you want to create a 2x2 array of all numbers, you call ones((2,2)). And there's no alternative that's consistent! Both rand((2,2)) and ones(2,2) generate errors, in the latter case it's a cryptic error. Why cann't we have a little consistency!

A second complaint is the failure to adequately deal with the difference between arrays with a single element, and scalars. Having to manually convert between the two is a pain, but the bigger issue is that it forces students to learn about the intricacies about typing in a context that really isn't approprate for that -- we're just trying to do some simple computations, and want to leave the computer science to the computer scientists.

Both issues may seem rather minor, but remember that syntax errors are a huge headache for students just learning to program, and type errors are atleast a degree harder to deal with. These are the very kinds of issues that drove me to python in the first place, and now they are driving me away.

UPDATE 2014-06-09: This blog post expresses similar frustrations, allong with some possible practical solutions. Good to be part of a chorus.