On Sat, Aug 30, 2014 at 1:45 PM, Nathaniel Smith <n...@pobox.com> wrote:
> On Sat, Aug 30, 2014 at 6:43 PM, <josef.p...@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) > Thanks Nathaniel. np.negative might save a bit of memory and time when we have to negate the loglikelihood all the time. Josef > > -n > > -- > Nathaniel J. Smith > Postdoctoral researcher - Informatics - University of Edinburgh > http://vorpus.org > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion