Commit 1a3b804c authored by Tiago Peixoto's avatar Tiago Peixoto

Refer to numpy instead of ~numpy in docstrings

parent fe232c9d
......@@ -594,7 +594,7 @@ class PropertyMap(object):
ma = property(__get_set_m_array,
lambda self, v: self.__get_set_m_array(v, False),
doc=r"""The same as the :attr:`~PropertyMap.a` attribute, but
instead a :class:`~numpy.ma.MaskedArray` object is returned,
instead a :class:`numpy.ma.MaskedArray` object is returned,
which contains only entries for vertices/edges which are not
filtered out. If there are no filters in place, a regular
:class:`~graph_tool.PropertyArray` is returned, which
......@@ -951,7 +951,7 @@ class GraphPropertyMap(PropertyMap):
class PropertyArray(numpy.ndarray):
"""This is a :class:`~numpy.ndarray` subclass which keeps a reference of its
"""This is a :class:`numpy.ndarray` subclass which keeps a reference of its
:class:`~graph_tool.PropertyMap` owner.
"""
......@@ -3468,7 +3468,7 @@ class GraphView(Graph):
The argument ``g`` must be an instance of a :class:`~graph_tool.Graph`
class. If specified, ``vfilt`` and ``efilt`` select which vertices and edges
are filtered, respectively. These parameters can either be a boolean-valued
:class:`~graph_tool.PropertyMap` or :class:`~numpy.ndarray`, which specify
:class:`~graph_tool.PropertyMap` or :class:`numpy.ndarray`, which specify
which vertices/edges are selected, or an unary function that returns
``True`` if a given vertex/edge is to be selected, or ``False`` otherwise.
......
......@@ -225,7 +225,7 @@ def betweenness(g, pivots=None, vprop=None, eprop=None, weight=None, norm=True):
----------
g : :class:`~graph_tool.Graph`
Graph to be used.
pivots : list or :class:`~numpy.ndarray`, optional (default: None)
pivots : list or :class:`numpy.ndarray`, optional (default: None)
If provided, the betweenness will be estimated using the vertices in
this list as pivots. If the list contains all nodes (the default) the
algorithm will be exact, and if the vertices are randomly chosen the
......
......@@ -216,11 +216,11 @@ def corr_hist(g, deg_source, deg_target, bins=[[0, 1], [0, 1]], weight=None,
Returns
-------
bin_counts : :class:`~numpy.ndarray`
bin_counts : :class:`numpy.ndarray`
Two-dimensional array with the bin counts.
source_bins : :class:`~numpy.ndarray`
source_bins : :class:`numpy.ndarray`
Source degree bins
target_bins : :class:`~numpy.ndarray`
target_bins : :class:`numpy.ndarray`
Target degree bins
......@@ -315,11 +315,11 @@ def combined_corr_hist(g, deg1, deg2, bins=[[0, 1], [0, 1]], float_count=True):
Returns
-------
bin_counts : :class:`~numpy.ndarray`
bin_counts : :class:`numpy.ndarray`
Two-dimensional array with the bin counts.
first_bins : :class:`~numpy.ndarray`
first_bins : :class:`numpy.ndarray`
First degree bins
second_bins : :class:`~numpy.ndarray`
second_bins : :class:`numpy.ndarray`
Second degree bins
Notes
......@@ -406,12 +406,12 @@ def avg_neighbor_corr(g, deg_source, deg_target, bins=[0, 1], weight=None):
Returns
-------
bin_avg : :class:`~numpy.ndarray`
bin_avg : :class:`numpy.ndarray`
Array with the deg_target average for the get_source bins.
bin_dev : :class:`~numpy.ndarray`
bin_dev : :class:`numpy.ndarray`
Array with the standard deviation of the deg_target average for the
get_source bins.
bins : :class:`~numpy.ndarray`
bins : :class:`numpy.ndarray`
Source degree bins,
......@@ -498,11 +498,11 @@ def avg_combined_corr(g, deg1, deg2, bins=[0, 1]):
Returns
-------
bin_avg : :class:`~numpy.ndarray`
bin_avg : :class:`numpy.ndarray`
Array with the deg2 average for the deg1 bins.
bin_dev : :class:`~numpy.ndarray`
bin_dev : :class:`numpy.ndarray`
Array with the standard deviation of the deg2 average for the deg1 bins.
bins : :class:`~numpy.ndarray`
bins : :class:`numpy.ndarray`
The deg1 bins.
Notes
......
......@@ -1172,7 +1172,7 @@ class PottsGlauberState(DiscreteStateBase):
----------
g : :class:`~graph_tool.Graph`
Graph to be used for the dynamics
f : list of lists or two-dimensional :class:`~numpy.ndarray`
f : list of lists or two-dimensional :class:`numpy.ndarray`
Matrix of interactions between spin values, of dimension
:math:`q\times q`, where :math:`q` is the number of spins.
w : :class:`~graph_tool.EdgePropertyMap` or ``float`` (optional, default: ``1.``)
......@@ -1263,7 +1263,7 @@ class PottsMetropolisState(DiscreteStateBase):
----------
g : :class:`~graph_tool.Graph`
Graph to be used for the dynamics
f : list of lists or two-dimensional :class:`~numpy.ndarray`
f : list of lists or two-dimensional :class:`numpy.ndarray`
Matrix of interactions between spin values, of dimension
:math:`q\times q`, where :math:`q` is the number of spins.
w : :class:`~graph_tool.EdgePropertyMap` or ``float`` (optional, default: ``1.``)
......
......@@ -102,13 +102,13 @@ def random_graph(N, deg_sampler, directed=True,
If ``True``, parallel edges are allowed.
self_loops : bool (optional, default: ``False``)
If ``True``, self-loops are allowed.
block_membership : list or :class:`~numpy.ndarray` or function (optional, default: ``None``)
block_membership : list or :class:`numpy.ndarray` or function (optional, default: ``None``)
If supplied, the graph will be sampled from a stochastic blockmodel
ensemble, and this parameter specifies the block membership of the
vertices, which will be passed to the
:func:`~graph_tool.generation.random_rewire` function.
If the value is a list or a :class:`~numpy.ndarray`, it must have
If the value is a list or a :class:`numpy.ndarray`, it must have
``len(block_membership) == N``, and the values will define to which
block each vertex belongs.
......@@ -1650,7 +1650,7 @@ def triangulation(points, type="simple", periodic=False):
Parameters
----------
points : :class:`~numpy.ndarray`
points : :class:`numpy.ndarray`
Point set for the triangulation. It may be either a N x d array, where N
is the number of points, and d is the space dimension (either 2 or 3).
type : string (optional, default: ``'simple'``)
......@@ -1768,7 +1768,7 @@ def lattice(shape, periodic=False):
Parameters
----------
shape : list or :class:`~numpy.ndarray`
shape : list or :class:`numpy.ndarray`
List of sizes in each dimension.
periodic : bool (optional, default: ``False``)
If ``True``, periodic boundary conditions will be used.
......@@ -1926,13 +1926,13 @@ def geometric_graph(points, radius, ranges=None):
Parameters
----------
points : list or :class:`~numpy.ndarray`
points : list or :class:`numpy.ndarray`
List of points. This must be a two-dimensional array, where the rows are
coordinates in a N-dimensional space.
radius : float
Pairs of points with an euclidean distance lower than this parameters
will be connected.
ranges : list or :class:`~numpy.ndarray` (optional, default: ``None``)
ranges : list or :class:`numpy.ndarray` (optional, default: ``None``)
If provided, periodic boundary conditions will be assumed, and the
values of this parameter it will be used as the ranges in all
dimensions. It must be a two-dimensional array, where each row will
......
......@@ -80,9 +80,9 @@ def vertex_hist(g, deg, bins=[0, 1], float_count=True):
Returns
-------
counts : :class:`~numpy.ndarray`
counts : :class:`numpy.ndarray`
The bin counts.
bins : :class:`~numpy.ndarray`
bins : :class:`numpy.ndarray`
The bin edges.
See Also
......@@ -142,9 +142,9 @@ def edge_hist(g, eprop, bins=[0, 1], float_count=True):
Returns
-------
counts : :class:`~numpy.ndarray`
counts : :class:`numpy.ndarray`
The bin counts.
bins : :class:`~numpy.ndarray`
bins : :class:`numpy.ndarray`
The bin edges.
See Also
......@@ -391,9 +391,9 @@ def distance_histogram(g, weight=None, bins=[0, 1], samples=None,
Returns
-------
counts : :class:`~numpy.ndarray`
counts : :class:`numpy.ndarray`
The bin counts.
bins : :class:`~numpy.ndarray`
bins : :class:`numpy.ndarray`
The bin edges.
See Also
......
......@@ -1210,9 +1210,9 @@ def label_components(g, vprop=None, directed=None, attractors=False):
-------
comp : :class:`~graph_tool.VertexPropertyMap`
Vertex property map with component labels.
hist : :class:`~numpy.ndarray`
hist : :class:`numpy.ndarray`
Histogram of component labels.
is_attractor : :class:`~numpy.ndarray`
is_attractor : :class:`numpy.ndarray`
A Boolean array specifying if the strongly connected components are
attractors or not. This returned only if ``attractors == True``, and the
graph is directed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment