matplotlib and numpy

As many of you know, Travis has been working heroically on the next
generation Numeric, now called numpy

http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103

numpy's goal is to combine the best of Numeric and numarray and unify
the two camps of array users. Having two array packages has been a
major drag on scientific python, since packages available for one may
not work with the other, splitting developer resources and driving
folks to Ruby :slight_smile: So getting everyone to agree on and use a single
array package will be a major step forward, and Travis has been
working with the numarray camp to make sure that numpy will have all
the features they need. As I understand it, Perry and Todd and crew
have decided to transition to numpy as it becomes feasible for them.

The latest release of matplotlib (many thanks to Charlie Moad for
building and testing across platforms) supports numpy in the numerix
layer (set numerix in your matplotlibrc file), and the windows build
has support for all three packages (Numeric, numarray and numpy) built
in.

I encourage everyone to download the latest numpy and give it a test
drive with matplotlib, since ultimately we would like to stop
supporting three array packages and just adopt one. This will
significantly reduce compile times and binary distribution sizes, and
will make the code and build process cleaner. We don't have a
specific roadmap for when the numerix layer will become deprecated,
but we would like it to happen sooner rather than later.

You can profile your matplotlib scripts by using the numerix flags
from the prompt, eg

  > time python myscript.py --numpy
  > time python myscripy.py --Numeric
  > time python myscripy.py --numarray

Also, note that when building matplotlib from source, the matplotlibrc
file is now autogenerated, setting the backend and numerix setting
depending on what was found at compile time. So make sure the
generated rc file is what you want, and if not edit it and move it to
your ~/.matplotlib dir.

Travis has written an excellent guide to numpy that can be purchased
at http://www.tramy.us . If you can afford it, it's a great way to
learn all the new features and support Travis (and his 5 kids!) and
scipy development. I think he will give discounts to the financially
challenged, so don't hesitate to contact him about it.
  
Thanks to Daishi, Eric and Andrew for their work on the numpy support.

JDH

Since this is sanctioned by John, I'll definitely buy a copy
(I also have a copy of Numerical Python...which has among others,
Travis's name in the author list...a very nice document).
I have been following both the matplotlib and the scipy lists for
several years now. I'm _way_ behind on upgrading to the latest
mpl...but I will soon. Scipy has been something that I have been
following, but I have not yet tried. I did install numeric...but not
numarray. I am very glad that things appear to be consolidating
to numpy.

One question for Travis. On the web site, the NumPy item is listed
as "pre-order". I realize it was only what last week that the decision
to call it NumPy was decided (I like that name as well), but what does
pre-order mean (e.g. when do you expect the e-book will be ready)?
I know there has been some discussion of this on the scipy list,
sorry if i don't recall if this question has already been covered.

Thanks,

Jim

···

On Thu, 12 Jan 2006, John Hunter wrote:

As many of you know, Travis has been working heroically on the next
generation Numeric, now called numpy

http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103

numpy's goal is to combine the best of Numeric and numarray and unify
the two camps of array users. Having two array packages has been a
major drag on scientific python, since packages available for one may
not work with the other, splitting developer resources and driving
folks to Ruby :slight_smile: So getting everyone to agree on and use a single
array package will be a major step forward, and Travis has been
working with the numarray camp to make sure that numpy will have all
the features they need. As I understand it, Perry and Todd and crew
have decided to transition to numpy as it becomes feasible for them.

The latest release of matplotlib (many thanks to Charlie Moad for
building and testing across platforms) supports numpy in the numerix
layer (set numerix in your matplotlibrc file), and the windows build
has support for all three packages (Numeric, numarray and numpy) built
in.

I encourage everyone to download the latest numpy and give it a test
drive with matplotlib, since ultimately we would like to stop
supporting three array packages and just adopt one. This will
significantly reduce compile times and binary distribution sizes, and
will make the code and build process cleaner. We don't have a
specific roadmap for when the numerix layer will become deprecated,
but we would like it to happen sooner rather than later.

You can profile your matplotlib scripts by using the numerix flags
from the prompt, eg

  > time python myscript.py --numpy
  > time python myscripy.py --Numeric
  > time python myscripy.py --numarray

Also, note that when building matplotlib from source, the matplotlibrc
file is now autogenerated, setting the backend and numerix setting
depending on what was found at compile time. So make sure the
generated rc file is what you want, and if not edit it and move it to
your ~/.matplotlib dir.

Travis has written an excellent guide to numpy that can be purchased
at http://www.tramy.us . If you can afford it, it's a great way to
learn all the new features and support Travis (and his 5 kids!) and
scipy development. I think he will give discounts to the financially
challenged, so don't hesitate to contact him about it.
  
Thanks to Daishi, Eric and Andrew for their work on the numpy support.

JDH

One question for Travis. On the web site, the NumPy item is listed
as "pre-order". I realize it was only what last week that the decision
to call it NumPy was decided (I like that name as well), but what does
pre-order mean (e.g. when do you expect the e-book will be ready)?
I know there has been some discussion of this on the scipy list,
sorry if i don't recall if this question has already been covered.

The (pre-order) status will be there until the e-book is completely finished. However, it is pretty far along already, and I deliver the current copy immediately as an email attachment.

The C-API section needs some updating after the change (still some references to SciPy Core), and the masked array and distutils/testing chapters need to be completed on the Python side. On the C-API side, the full C-API is documented, but I need to complete the chapters explaining how to extend NumPy in a simple way, a chapter showing how some more advanced methods, and the final chapter that explains some more difficult sections of the source code.

Basically, 11/16 chapters are finished. The addition of improved record arrays, the data-type descriptor objects, and the renaming set me back a bit on finishing the book, but it is still very useful right now --- especially on the Python side of things.

For people who write C-extensions the old Numeric C-API still works (just replace Numeric/arrayobject.h with numpy/arrayobject.h), but some of the new possibilities include defining your own data-type in C and subclassing in C from the ndarray. Also, much more of the functionality of NumPy is available as a C-call (instead of always going through Python method calls).

I appreciate John's announcement. I'm very excited that we all might be able to convert over to a single array sometime soon.

-Travis

Hi list,

does anyone know a way to increase all font sizes at once e.g.
tickmarks, legend, title, text, ... everything. I was not able to find
the rc-parameter for this purpose.

Joost