Skip to content

Commit

Permalink
Merge pull request #173 from jGaboardi/pep8_docs
Browse files Browse the repository at this point in the history
updating ReadTheDocs following #172
  • Loading branch information
jGaboardi committed Nov 29, 2018
2 parents b13bcc9 + 8b6722a commit 7cf0d95
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/generated/spaghetti.network.Network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spaghetti.network.Network
~Network.count_per_edge
~Network.distancebandweights
~Network.enum_links_node
~Network.extract_components
~Network.extractgraph
~Network.loadnetwork
~Network.nearestneighbordistances
Expand Down
1 change: 1 addition & 0 deletions spaghetti/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def ffunction(nearest, lowerbound, upperbound, npts, nsteps=10):
y-axis of values
"""

nobs = len(nearest)
x = np.linspace(lowerbound, upperbound, nsteps)
nearest = np.sort(nearest)
Expand Down
8 changes: 4 additions & 4 deletions spaghetti/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ def count_per_edge(self, obs_on_network, graph=True):
obs_on_network : dict
Dictionary of observations on the network.
Either {(edge):{pt_id:(coords)}} or
{edge:[(coord),(coord),(coord)]}
{edge:[(coord),(coord),(coord)]}
Returns
-------
Expand Down Expand Up @@ -1039,7 +1039,7 @@ def node_distance_matrix(self, n_processes, gen_tree=False):
def allneighbordistances(self, sourcepattern, destpattern=None,
fill_diagonal=None, n_processes=None,
gen_tree=False, snap_dist=False):
""" Compute either all distances between i and j in a single
"""Compute either all distances between i and j in a single
point pattern or all distances between each i from a source
pattern and all j from a destination pattern.
Expand All @@ -1063,7 +1063,7 @@ def allneighbordistances(self, sourcepattern, destpattern=None,
n_processes : int, str
(Optional) Specify the number of cores to utilize. Default
is 1 core. Use ``int`` to specify an exact number or cores.
Use ``"all"`` to request all available cores.
Use ``"all"`` to request all available cores.
gen_tree : bool
Rebuild shortest path ``True``, or skip ``False``.
Expand Down Expand Up @@ -1903,7 +1903,7 @@ def __init__(self, in_data=None, idvariable=None, attribute=False):

class SimulatedPointPattern():
"""Struct style class to mirror the ``PointPattern`` class. If the
``PointPatternv class has methods, it might make sense to make this
``PointPattern`` class has methods, it might make sense to make this
a child of that class. This class is not intended to be used by the
external user.
Expand Down
3 changes: 3 additions & 0 deletions spaghetti/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def dijkstra(ntw, cost, v0, n=float('inf')):
133
"""

distance = [n for x in ntw.node_list]
idx = ntw.node_list.index(v0)
distance[ntw.node_list.index(v0)] = 0
Expand Down Expand Up @@ -251,6 +252,7 @@ def dijkstra_mp(ntw_cost_node):
133
"""

ntw, cost, node = ntw_cost_node
distance, pred = dijkstra(ntw, cost, node)
return distance, pred
Expand Down Expand Up @@ -285,6 +287,7 @@ def squared_distance_point_segment(point, segment):
(1.0, array([1., 0.]))
"""

#
p0, p1 = [np.array(p) for p in segment]
v = p1 - p0
Expand Down

0 comments on commit 7cf0d95

Please sign in to comment.