Skip to content

Commit

Permalink
DOC: Create links when np.ndarray is the return type
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Mar 16, 2019
1 parent 577c2aa commit e9b2698
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions sfs/tapering.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def tukey(active, alpha):
Returns
-------
(len(active),) numpy.ndarray
(len(active),) `numpy.ndarray`
Tapering weights.
Examples
Expand Down Expand Up @@ -123,7 +123,7 @@ def kaiser(active, beta):
Returns
-------
(len(active),) numpy.ndarray
(len(active),) `numpy.ndarray`
Tapering weights.
Examples
Expand Down
21 changes: 10 additions & 11 deletions sfs/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def rotation_matrix(n1, n2):
Returns
-------
(3, 3) numpy.ndarray
(3, 3) `numpy.ndarray`
Rotation matrix.
"""
Expand Down Expand Up @@ -78,18 +78,17 @@ def sph2cart(alpha, beta, r):
Returns
-------
x : float or array_like
x : float or `numpy.ndarray`
x-component of Cartesian coordinates
y : float or array_like
y : float or `numpy.ndarray`
y-component of Cartesian coordinates
z : float or array_like
z : float or `numpy.ndarray`
z-component of Cartesian coordinates
"""
x = r * np.cos(alpha) * np.sin(beta)
y = r * np.sin(alpha) * np.sin(beta)
z = r * np.cos(beta)

return x, y, z


Expand All @@ -115,11 +114,11 @@ def cart2sph(x, y, z):
Returns
-------
alpha : float or array_like
alpha : float or `numpy.ndarray`
Azimuth angle in radiants
beta : float or array_like
beta : float or `numpy.ndarray`
Colatitude angle in radiants (with 0 denoting North pole)
r : float or array_like
r : float or `numpy.ndarray`
Radius
"""
Expand Down Expand Up @@ -252,7 +251,7 @@ def strict_arange(start, stop, step=1, endpoint=False, dtype=None, **kwargs):
Returns
-------
numpy.ndarray
`numpy.ndarray`
Array of evenly spaced values. See :func:`numpy.arange`.
"""
Expand Down Expand Up @@ -508,9 +507,9 @@ def image_sources_for_box(x, L, N, prune=True):
Returns
-------
xs : (M, D) array_like
xs : (M, D) `numpy.ndarray`
original & image source locations.
wall_count : (M, 2D) array_like
wall_count : (M, 2D) `numpy.ndarray`
number of reflections at individual walls for each source.
"""
Expand Down

0 comments on commit e9b2698

Please sign in to comment.