Python wrappers
Public Python APIs implemented by this engine symbol.Element-wise test for — returns a boolean tensor that is True at every position whose input is positive or negative infinity.
Not differentiable: this op does not register an autograd node, so the
returned tensor is detached even if a has requires_grad=True.
Math
\text{False} & \text{otherwise} \end{cases}$$ **Shape** Output shape equals input shape (elementwise). **See Also** `isnan_op`, `isfinite_op`, `nan_to_num_op`.Parameters
aTensorImplPtrInput tensor of any floating-point dtype. Integer dtypes always produce
False at every position (no value can represent infinity).Returns
TensorImplPtrBoolean tensor with the same shape and device as a. Dtype is Dtype::Bool regardless of a->dtype().
Notes
CPU dispatch uses Accelerate's vector isinf primitive; GPU dispatch
uses MLX's isinf. NaN inputs yield False (NaN is neither
finite nor infinite).