[Numpy-discussion] inplace unary operations?

Nathaniel Smith njs at pobox.com
Sat Aug 30 13:45:47 EDT 2014


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 inplace
> ?

np.logical_not(arr, out=arr)
np.negative(arr, out=arr)

-n

-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org



More information about the NumPy-Discussion mailing list