Is there a standard way of creating an object array restricted to a particular python type? I want a safe way of sending arrays of objects back and forth between Python and C++, and it'd be great if I could use numpy arrays on the Python side instead of creating a new type.
For example, I might have a C++ class Force which is simultaneously a valid Python extension type (also named "Force"). I'd like to be able to switch between Array<Force> on the C++ side and a suitable numpy array on the Python side, while preventing Python from ever storing an object with different type (say, a tuple) in the array. Note that Array<Force> has the memory representation of an array of PyObject*'s. Thanks, Geoffrey _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion