[Numpy-discussion] inplace unary operations?
ben.root at ou.edu
Sat Aug 30 14:39:33 EDT 2014
Random thoughts are the best kinds of thoughts! I didn't even know there
was a np.negative() function! I will keep this card up my sleeve at work
for one of those save-the-day moments in optimization.
On Sat, Aug 30, 2014 at 1:45 PM, Nathaniel Smith <njs at pobox.com> wrote:
> On Sat, Aug 30, 2014 at 6:43 PM, <josef.pktd at gmail.com> wrote:
> > Is there a way to negate a boolean, or to change the sign of a float
> > ?
> np.logical_not(arr, out=arr)
> np.negative(arr, out=arr)
> Nathaniel J. Smith
> Postdoctoral researcher - Informatics - University of Edinburgh
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion