From 75f1a1c00e159e9ad5cbc16242b471faa7c6ed41 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Mon, 16 Dec 2019 14:17:03 +0100
Subject: [PATCH] Fix README.rst/index.rst

---
 README.rst     |  9 ++-------
 docs/index.rst | 16 +++++++++-------
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/README.rst b/README.rst
index 022b88e..87a99e6 100644
--- a/README.rst
+++ b/README.rst
@@ -92,18 +92,13 @@ You can also use the class `AutoDiffOp` to obtain both the assignments (if you a
     op = AutoDiffOp(forward_assignments)
     backward_assignments = op.backward_assignments   
 
-    x_tensor = pystencils.autodiff.tf_variable_from_field(x)
-    y_tensor = pystencils.autodiff.tf_variable_from_field(y)
-    tensorflow_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='tensorflow')
+    tensorflow_op = op.create_tensorflow_op(backend='tensorflow_native')
 
 ... or Torch:
 
 .. code-block:: python
 
-    x_tensor = pystencils.autodiff.torch_tensor_from_field(x, cuda=False, requires_grad=True)
-    y_tensor = pystencils.autodiff.torch_tensor_from_field(y, cuda=False, requires_grad=True)
-
-    z_tensor = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch')
+    torch_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch_native')
 
 Test Report and Coverage
 ------------------------
diff --git a/docs/index.rst b/docs/index.rst
index c6a56ec..946234c 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -84,18 +84,20 @@ You can also use the class :class:`pystencils_autodiff.AutoDiffOp` to obtain bot
     op = AutoDiffOp(forward_assignments)
     backward_assignments = op.backward_assignments   
 
-    x_tensor = pystencils.autodiff.tf_variable_from_field(x)
-    y_tensor = pystencils.autodiff.tf_variable_from_field(y)
-    tensorflow_op = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='tensorflow')
+    tensorflow_op = op.create_tensorflow_op(backend='tensorflow_native')
+
+.. testoutput::
+   :hide:
+   :options: -ELLIPSIS, +NORMALIZE_WHITESPACE
+
+    Compiling Tensorflow module...
+    Linking Tensorflow module...
 
 ... or Torch:
 
 .. testcode::
 
-    x_tensor = pystencils.autodiff.torch_tensor_from_field(x, cuda=False, requires_grad=True)
-    y_tensor = pystencils.autodiff.torch_tensor_from_field(y, cuda=False, requires_grad=True)
-
-    z_tensor = op.create_tensorflow_op({x: x_tensor, y: y_tensor}, backend='torch')
+    torch_op = op.create_tensorflow_op(backend='torch_native')
 
 
 Contents
-- 
GitLab