Skip to content

Commit

Permalink
Fix docstrings: Nodes.get, Edges.get (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
joni-herttuainen committed Oct 19, 2023
1 parent 4091868 commit 6315a6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions bluepysnap/edges/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,16 @@ def ids(self, group=None, sample=None, limit=None):
return self._get_ids_from_pop(fun, CircuitEdgeIds, sample=sample, limit=limit)

def get(self, edge_ids=None, properties=None): # pylint: disable=arguments-renamed
"""Edge properties as pandas DataFrame.
"""Edge properties by iterating populations.
Args:
edge_ids (int/CircuitEdgeId/CircuitEdgeIds/sequence): same as Edges.ids().
properties (None/str/list): an edge property name or a list of edge property names.
If set to None ids are returned.
Returns:
pandas.Series/pandas.DataFrame:
- A pandas Series indexed by edge IDs if ``properties`` is scalar.
- A pandas DataFrame indexed by edge IDs if ``properties`` is list.
generator: yields tuples of ``(<population_name>, pandas.DataFrame)``:
- DataFrame indexed by CircuitEdgeIds containing the properties from ``properties``.
Notes:
The Edges.property_names function will give you all the usable properties
Expand Down
6 changes: 3 additions & 3 deletions bluepysnap/nodes/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def ids(self, group=None, sample=None, limit=None):
return self._get_ids_from_pop(fun, CircuitNodeIds, sample=sample, limit=limit)

def get(self, group=None, properties=None): # pylint: disable=arguments-differ
"""Node properties as a pandas DataFrame.
"""Node properties by iterating populations.
Args:
group (CircuitNodeIds/int/sequence/str/mapping/None): Which nodes will have their
Expand All @@ -132,8 +132,8 @@ def get(self, group=None, properties=None): # pylint: disable=arguments-differ
Otherwise return all properties.
Returns:
pandas.DataFrame: Return a pandas DataFrame indexed by NodeCircuitIds containing the
properties from ``properties``.
generator: yields tuples of ``(<population_name>, pandas.DataFrame)``:
- DataFrame indexed by CircuitNodeIds containing the properties from ``properties``.
Notes:
The NodePopulation.property_names function will give you all the usable properties
Expand Down

0 comments on commit 6315a6b

Please sign in to comment.