Numeric write-in place facility
da at ski.org
Mon Nov 29 22:11:41 CET 1999
On Mon, 29 Nov 1999, Ionel Simionescu wrote:
> In a post on the wxPython list, Markus Gritsch suggested that array ops such
> a = a+b
> can be done faster by using write-in place:
> Playing around I see now that other ufuncs allow a write-in target
> specification as their last argument. For example,
> will put the result in b (if its dimension and type are Ok).
> The docs do not tell much about this.
> Can anyone confirm/clarify/comment ?
1) Confirm: yes
2) Clarify: well, I think you pretty much summed it up
3) Comment: Watch out for 'slices'. If you do
a = arange(10)
b = a[::-1]
you might be suprised =)
More information about the Python-list