[Numpy-discussion] mixing NUMERIC and NUMARRAY

Gerard Vermeulen gvermeul at grenoble.cnrs.fr
Mon May 12 13:08:02 CDT 2003


Hi,

It was remarkable easy to make my plot package PyQwt for Numeric, also
compatible with numarray :-)

( PyQwt is a wrapper for Qwt, a Qt-based library with widgets useful for
  science and engineering -- http://gerard.vermeulen.free.fr ) 

I discovered by accident that PyQwt compiled with
#include <numarray/arrayobject.h>
plots Numeric-arrays and that PyQwt compiled with
#include <Numeric/arrayobject.h>
plots numarray-arrays.

The only interface between PyQwt and Numeric (or numarray) passes through
PyArray_ContiguousFromObject to cast sequences into arrays from which data
is copied into Qwt's data structures.

PyQwt never returns Numeric- or numarray-arrays.

Is this feature platform dependent? Or is it safe to release PyQwt,
claiming that a Numeric-compiled PyQwt is compatible with numarray
and vice-versa?

Gerard




More information about the Numpy-discussion mailing list