**diff options**

author | Michael Kerber <mkerber@fgeompc15.tugraz.local> | 2020-08-25 15:47:41 +0200 |
---|---|---|

committer | Michael Kerber <mkerber@fgeompc15.tugraz.local> | 2020-08-25 15:47:41 +0200 |

commit | 746517263955660b5a0a0f4defc18f2d2d84f502 (patch) | |

tree | 2c33bb62944891c48cdffba5487d6d8928fd9673 | |

parent | 04f3abb6598e9336df64a1ef408323d875c2cee3 (diff) |

more formatting issuesupstream/latest

-rw-r--r-- | python/README.rst | 19 |

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) |