Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstrings: Nodes.get, Edges.get #239

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions bluepysnap/edges/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,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