Skip to content

Commit

Permalink
remove left-over .dps property
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Jan 10, 2021
1 parent a7f98cc commit 3750331
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
5 changes: 2 additions & 3 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,14 @@ properties common to all neurons.

TreeNeuron-specific methods
---------------------------
These are class methods available only for ``TreeNeurons``. Most of them are simply
short-hands for the other navis functions.
These are class methods available only for ``TreeNeurons``. Most of them are
simply short-hands for the other navis functions.

.. autosummary::
:toctree: generated/

~navis.TreeNeuron.convert_units
~navis.TreeNeuron.downsample
~navis.TreeNeuron.get_dps
~navis.TreeNeuron.get_graph_nx
~navis.TreeNeuron.get_igraph
~navis.TreeNeuron.prune_by_longest_neurite
Expand Down
13 changes: 1 addition & 12 deletions navis/core/neurons.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,6 @@ class TreeNeuron(BaseNeuron):
graph: 'nx.DiGraph'
igraph: 'igraph.Graph' # type: ignore # doesn't know iGraph

dps: pd.DataFrame

n_branches: int
n_leafs: int
cable_length: Union[int, float]
Expand Down Expand Up @@ -846,7 +844,7 @@ class TreeNeuron(BaseNeuron):

#: Temporary attributes that need to be regenerated when data changes.
TEMP_ATTR = ['_igraph', '_graph_nx', '_segments', '_small_segments',
'_geodesic_matrix', '_dps', 'centrality_method', '_simple',
'_geodesic_matrix', 'centrality_method', '_simple',
'_cable_length']

#: Attributes used for neuron summary
Expand Down Expand Up @@ -1239,15 +1237,6 @@ def cycles(self) -> Optional[List[int]]:
except BaseException:
raise

@temp_property
def dps(self) -> 'core.Dotprops':
"""Neuron broken down into small linear segments."""
# If graph does not exist, create and return
if not hasattr(self, '_dps'):
# This also sets the attribute
self._dps = self.get_dps()
return self._dps

@property
def simple(self) -> 'TreeNeuron':
"""Return simple neuron representation.
Expand Down

0 comments on commit 3750331

Please sign in to comment.