Le 13/02/2012 19:17, eat a écrit :
> wouldn't it be nice if you could just write:
> a= np.empty(shape).fill(A)
> this would be possible if .fill(.) just returned self.
Thanks for the tip. I noticed several times this was not working
(because of course, in the mean time, I forgot it...)
but I had totally overlooked the reasons (just imagining there was some
garbage collection magic vanishing my arrays !!)

I find the syntax "np.empty(shape).fill(A)" being indeed a good
alternative to the burden of creating a new numpy.fill (or numpy.filled
?) function.

-- 
Pierre
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to