-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Error in method description in ismags.py #6594
Copy link
Copy link
Closed
Labels
Description
The docstring of partition_to_color method in ismags.py seems off to me. The description is not clear, and it's hard to understand what the method is supposed to do.
def partition_to_color(partitions):
"""
Creates a dictionary with for every item in partition for every partition
in partitions the index of partition in partitions.
Parameters
----------
partitions: collections.abc.Sequence[collections.abc.Iterable]
As returned by :func:`make_partitions`.
Returns
-------
dict
"""
colors = {}
for color, keys in enumerate(partitions):
for key in keys:
colors[key] = color
return colorsI think the following description explains the method better.
def partition_to_color(partitions):
"""
Creates a dictionary that maps each item in each partition to the index of
the partition it belongs to
"""If the new description looks alright, I'll go ahead and make the changes.
Reactions are currently unavailable