[Numpy-discussion] please comment on scalar types
oliphant at ee.byu.edu
Mon Aug 14 22:13:37 CDT 2006
Sebastian Haase wrote:
>Travis Oliphant wrote:
>And that automatically implies that there a 32bit-int cannot be used in
>place of a "normal python integer" !?
>I could see wanting to use int16 or event uint8 as a tuple index.
>Logically a small type would be save to use in place of a bigger one ...
That is the purpose behind the __index__ attribute I added to Python 2.5
(see PEP 357). This allows all the scalar integers to be used in place
of integers inside of Python.
More information about the Numpy-discussion