zeros and ones difference between pylab and scipy

I have successfully (I think) coerced my students into using
Scipy/Numpy for signal processing and dynamic system modeling. They
are mechanical engineering coming from a Matlab background. In order
to make using Python easy and have it feel like Matlab, I teach them
to put

from scipy import *
from pylab import *

at the beginning of every script. One problem with this is that the
zeros and ones functions of pylab default to integers while those from
scipy default to floating point numbers. I have had several students
this week beating there heads against problems that turned out to be
trying to put floating point values in an array that was created using
pylab.zeros.

Can this be changed? Is there a better approach I should take in
getting my students started using scipy and pylab together?

Thanks,

Ryan

Yes, this was left in initially for backward compatibility but I think
we should strive for maximal numpy compatibility going forward. In
svn, we now have pyplot ehich is like pylab but minus the numpy stuff.
Thus if you are using svn (or future releases) you can encourage your
students to

from scipy import *
from matplotlib.pyplot import *

···

On 10/11/07, Ryan Krauss <ryanlists@...287...> wrote:

Can this be changed? Is there a better approach I should take in
getting my students started using scipy and pylab together?

Can this be changed? Is there a better approach I should take in
getting my students started using scipy and pylab together?

Teaching them what is a module and a namespace is a good think, why don’t telling them to do :

import pylab as pl
import numpy as npy

for instance so that they have a feeling it’s almost like MAtlab, but better structured ?

Matthieu