lib/torch/tensor.rb in torch-rb-0.8.3 vs lib/torch/tensor.rb in torch-rb-0.9.0
- old
+ new
@@ -189,7 +189,19 @@
def dup
Torch.no_grad do
clone
end
end
+
+ # not a method in native_functions.yaml
+ # attribute in Python rather than method
+ def imag
+ Torch.imag(self)
+ end
+
+ # not a method in native_functions.yaml
+ # attribute in Python rather than method
+ def real
+ Torch.real(self)
+ end
end
end