summaryrefslogtreecommitdiff
path: root/python/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'python/README.rst')
-rw-r--r--python/README.rst19
1 files changed, 9 insertions, 10 deletions
diff --git a/python/README.rst b/python/README.rst
index 03abc60..7de641d 100644
--- a/python/README.rst
+++ b/python/README.rst
@@ -70,7 +70,7 @@ Other configurations are untested.
Please note that this package DOES NOT work with the Python 2.7.10 that ships with the operating
system in Mac OS X. These words of wisdom from `python.org`_ are worth heeding:
- The version of Python that ships with OS X is great for learning but it’s not good for development.
+ The version of Python that ships with OS X is great for learning but it is not good for development.
The version shipped with OS X may be out of date from the official current Python release,
which is considered the stable production version.
@@ -98,12 +98,12 @@ We will build an ordered boundary matrix of this simplicial complex consisting o
Now the code::
import phat
-
+
boundary_matrix = phat.boundary_matrix()
-
+
# or define a boundary matrix with the chosen internal representation
# boundary_matrix = phat.boundary_matrix(representation = phat.representations.bit_tree_pivot_column)
-
+
# set the respective columns -- (dimension, boundary) pairs
boundary_matrix.columns = [ (0, []),
(0, []),
@@ -112,10 +112,10 @@ Now the code::
(1, [1,3]),
(1, [0,3]),
(2, [2,4,5])]
-
+
# or equivalently, boundary_matrix = phat.boundary_matrix(representation = ..., columns = ...)
# would combine the creation of the matrix and the assignment of the columns
-
+
# print some information of the boundary matrix:
print("\nThe boundary matrix has %d columns:" % len(boundary_matrix.columns))
for col in boundary_matrix.columns:
@@ -123,13 +123,12 @@ Now the code::
if (col.boundary):
s = s + " Its boundary consists of the cells " + " ".join([str(c) for c in col.boundary])
print(s)
-
print("Overall, the boundary matrix has %d entries." % len(boundary_matrix))
-
+
pairs = boundary_matrix.compute_persistence_pairs()
-
+
pairs.sort()
-
+
print("\nThere are %d persistence pairs: " % len(pairs))
for pair in pairs:
print("Birth: %d, Death: %d" % pair)