[Numpy-discussion] Matching Nueric3/numarray namig conentions.
Travis Oliphant
oliphant at ee.byu.edu
Mon Aug 29 22:59:03 EDT 2005
Nadav Horesh wrote:
>Just started to play with Numeric3, looks as a significant usability
>improvement but....
>Same functions/classes are named differently in numarray and Numeric3,
>for instance typecodes.
>
>
This is true for only a few cases. Mostly the names are compatible, but
some of the naming conventions needed changing...
For example:
We have used type for the name of the data type in a numeric array. But,
this can be confusing because type refers to the kind of Python object
and all arrays are the same kind of python object. In addition, it is
natural to use the type= keyword in array constructors, but this then
blocks the use of that builtin for the function it is used with. Of
course typecode was previously chosen by Numeric, but now the types are
not codes (they are really type objects). Thus, I have been calling
type (dtype) in the new scipy.base. The alternative is to keep the name
type (eliminate the use of typecode, and rename python's type function
to pytype within scipy).
It could easily be changed if that is a real problem. Because of the
signficantly different usage of types in the new system, it is helpful
to have a different name (dtype). But, I could be persuaded to use
the word type and rename Python's type to pytype.
-Travis
More information about the NumPy-Discussion
mailing list