On Thu, Jul 10, 2008 at 16:45, Nicolas Rougier <[EMAIL PROTECTED]> wrote:
> Ideally, I would like to be able to write > > z = N.array (a, dtype=Unit) > > and would expect numpy to make a copy of the array by calling my type > with each element of a. Then, if my type accepts the argument during > creation, everything's fine, else it raises an error. Just use dtype=object and make any copies you need yourself. Encapsulate this logic in a function if you need it frequently. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion