[Numpy-discussion] Adding a 2D with a 1D array...
Thu Sep 10 03:42:55 CDT 2009
> 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)"
More information about the NumPy-Discussion