[Numpy-discussion] Matching Nueric3/numarray namig conentions.

Nadav Horesh NadavH at VisionSense.com
Tue Aug 30 01:00:28 EDT 2005


I am not picky about which name to use. It is would be the same for me
if Jay Miller would add a support for dtype keyword, and switch Int32
for int32 (or vice versa). In this case you both agree that types should
be classes (although  Numeric3 types == type is better) and not strings.
Once there is an agreement on the functions, methods and keyword (for
instance should arange function have a shape keyword), the exact names
choice should be an easy issue to overcome.

  Nadav.

Travis Oliphant wrote:

> 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