New array interface helper file
At http://numeric.scipy.org/array_interface.py you will find the start of a set of helper functions for the array interface that can make it more easy to deal with. It also documents the array interface with docstrings. I tried to attach these to properties, but then I don't know how to "see" them from Python. This is the kind of thing I think should go into Python If anybody would like to try their hand at converter functions to go back and forth between the struct module strings and the __array_descr__ string, make my day. -Travis
Travis Oliphant wrote:
At http://numeric.scipy.org/array_interface.py
you will find the start of a set of helper functions for the array interface that can make it more easy to deal with. It also documents the array interface with docstrings. I tried to attach these to properties, but then I don't know how to "see" them from Python.
Get it from the property object on the class itself. E.g. expanded.__array_shape__.__doc__ -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
Robert Kern wrote:
Travis Oliphant wrote:
At http://numeric.scipy.org/array_interface.py
you will find the start of a set of helper functions for the array interface that can make it more easy to deal with. It also documents the array interface with docstrings. I tried to attach these to properties, but then I don't know how to "see" them from Python.
Get it from the property object on the class itself. E.g.
expanded.__array_shape__.__doc__
Thank you. -Travis
participants (2)
-
Robert Kern -
Travis Oliphant