(l-onnx-doc-BitwiseNot)= # BitwiseNot (l-onnx-op-bitwisenot-18)= ## BitwiseNot - 18 ### Version - **name**: [BitwiseNot (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#BitwiseNot) - **domain**: `main` - **since_version**: `18` - **function**: `False` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 18**. ### Summary Returns the bitwise not of the input tensor element-wise. ### Inputs - **X** (heterogeneous) - **T**: Input tensor ### Outputs - **Y** (heterogeneous) - **T**: Output tensor ### Type Constraints * **T** in ( `tensor(int16)`, `tensor(int32)`, `tensor(int64)`, `tensor(int8)`, `tensor(uint16)`, `tensor(uint32)`, `tensor(uint64)`, `tensor(uint8)` ): Constrain input/output to integer tensors. ### Examples #### default ```python import numpy as np import onnx node = onnx.helper.make_node( "BitwiseNot", inputs=["x"], outputs=["bitwise_not"], ) # 2d x = create_random_int((3, 4), np.int32) y = np.bitwise_not(x) expect(node, inputs=[x], outputs=[y], name="test_bitwise_not_2d") # 3d x = create_random_int((3, 4, 5), np.uint16) y = np.bitwise_not(x) expect(node, inputs=[x], outputs=[y], name="test_bitwise_not_3d") # 4d x = create_random_int((3, 4, 5, 6), np.uint8) y = np.bitwise_not(x) expect(node, inputs=[x], outputs=[y], name="test_bitwise_not_4d") ```