summaryrefslogtreecommitdiff
path: root/src/python/doc/representations.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/doc/representations.rst')
-rw-r--r--src/python/doc/representations.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/python/doc/representations.rst b/src/python/doc/representations.rst
index 7eede2df..37d3aa53 100644
--- a/src/python/doc/representations.rst
+++ b/src/python/doc/representations.rst
@@ -52,7 +52,12 @@ This small example is also provided
PersLay
^^^^^^^
-.. testcode::
+.. testsetup:: perslay
+
+ import numpy
+ numpy.set_printoptions(precision=5)
+
+.. testcode:: perslay
import numpy as np
import tensorflow as tf
@@ -71,10 +76,13 @@ PersLay
perslay = gdtf.Perslay(phi=phi, weight=weight, perm_op=perm_op, rho=rho)
vectors = perslay(diagrams)
- np.set_printoptions(precision=5)
print(vectors)
-.. testoutput::
+.. testcleanup:: perslay
+
+ numpy.set_printoptions(precision=8)
+
+.. testoutput:: perslay
tf.Tensor(
[[[[1.72661e-16]