Skip to content

Commit

Permalink
Correct spelling etc in pack and unpack array routines
Browse files Browse the repository at this point in the history
  • Loading branch information
hyanwong authored and mergify[bot] committed Jun 17, 2024
1 parent 829497d commit d3c59ba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/tskit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ def unpack_strings(packed, offset, encoding="utf8"):

def pack_arrays(list_of_lists, dtype=np.float64):
"""
Packs the specified list of numberic lists into a flattened numpy array of
numpy float64 and corresponding offsets. See
Packs the specified list of numeric lists into a flattened numpy array
of the specified dtype with corresponding offsets. See
:ref:`sec_encoding_ragged_columns` for details of this encoding of columns
of variable length data.
:param list[list] list_of_lists: The list of numeric lists to encode.
:param dtype: The dtype for the packed array, defualts to float64
:param dtype: The dtype for the packed array, defaults to float64
:return: The tuple (packed, offset) of numpy arrays representing the flattened
input data and offsets.
:rtype: numpy.array (dtype=dtype), numpy.array (dtype=np.uint32)
Expand All @@ -235,14 +235,14 @@ def pack_arrays(list_of_lists, dtype=np.float64):

def unpack_arrays(packed, offset):
"""
Unpacks a list of arrays from the specified numpy arrays of packed
data and corresponding offsets. See
:ref:`sec_encoding_ragged_columns` for details of this encoding of columns
of variable length data.
Unpacks a list of arrays from the specified numpy array of packed
data and its associated offset array. See
:ref:`sec_encoding_ragged_columns` for details of how columns
of variable length data are encoded in this way.
:param numpy.ndarray packed: The flattened array of data.
:param numpy.ndarray offset: The array of offsets into the ``packed`` array.
:return: The list numpy arrays unpacked from the parameter arrays.
:return: A list of numpy arrays unpacked from the flattened ``packed`` array.
:rtype: list[numpy.ndarray]
"""
ret = []
Expand Down

0 comments on commit d3c59ba

Please sign in to comment.