meddlr.ops.complex.is_complex#
- meddlr.ops.complex.is_complex(x)[source]#
Returns if
xis a complex-tensor.This function is a wrapper around torch.is_complex() for PyTorch<1.7. torch < 1.7 does not have the
torch.is_complexdirective, so we can’t call it for older PyTorch versions.- Parameters
x (torch.Tensor) – A tensor.
- Returns
Trueif complex tensors are supported and the tensor is complex.- Return type
bool