This document is relevant for: Trn1, Trn2, Trn3

nki.language.logical_not#

nki.language.logical_not(x, dtype=None)[source]#

Compute the logical NOT element-wise.

((Similar to numpy.logical_not))

Warning

This API is experimental and may change in future releases.

Implemented as XOR with 1, so inputs should be boolean-like (0 or 1 values). For non-boolean inputs, use nl.equal(x, 0) instead.

Parameters:
  • x – a tile.

  • dtype – (optional) data type to cast the output type to (see Supported Data Types for more information); if not specified, it will default to be the same as the data type of the input tile.

Returns:

a tile with the logical NOT result.

This document is relevant for: Trn1, Trn2, Trn3