[Numpy-discussion] Adding a 2D with a 1D array...
Citi, Luca
lciti@essex.ac...
Thu Sep 10 03:42:55 CDT 2009
Hi Ruben,
> In both cases, as the print
> statement shows, offspr is already created.
>>> offspr[...] = r + a[:, None]
means "fill the existing object pointed by offspr with r + a[:, None]" while
>>> offspr = r + a[:,None]
means "create a new array and assign it to the variable offspr (after decref-ing the object previously pointed by offspr)"
Best,
Luca
More information about the NumPy-Discussion
mailing list