Skip to content

Commit

Permalink
doc review: rephrase and fix __setstate__ documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentRouvreau committed Apr 19, 2023
1 parent a3e9c0d commit d7d2049
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/python/gudhi/simplex_tree.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ cdef class SimplexTree:
return dereference(self.get_ptr()) == dereference(other.get_ptr())

def __getstate__(self):
""":returns: Serialized (or flattened) SimplexTree data structure for the SimplexTree to be pickled.
""":returns: Serialized (or flattened) SimplexTree data structure in order to pickle SimplexTree.
:rtype: numpy.array of shape (n,)
"""
cdef size_t buffer_size = self.get_ptr().get_serialization_size()
Expand All @@ -831,7 +831,8 @@ cdef class SimplexTree:
return np_buffer

def __setstate__(self, state):
"""Construct the SimplexTree data structure from a Python Byte Array
"""Construct the SimplexTree data structure from a Numpy Array (cf. :func:`~gudhi.SimplexTree.__getstate__`)
in order to unpickle a SimplexTree.
:param state: Serialized SimplexTree data structure
:type state: numpy.array of shape (n,)
Expand Down

0 comments on commit d7d2049

Please sign in to comment.