Skip to content

Commit 152f205

Browse files
committed
fix readthedocs linkcode_url error
1 parent 8c78fc0 commit 152f205

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def get_version(rel_path):
5151
if os.environ.get('READTHEDOCS') == 'True':
5252
extensions.append("sphinx_github_style")
5353

54+
# sphinx_github_style config
55+
linkcode_url = "https://github.com/settylab/Mellon"
56+
5457
source_suffix = [".rst", ".md"]
5558

5659
# Add any paths that contain templates here, relative to this directory.

mellon/cov.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def k_grad(self, x):
7070
Produce a function that computes the gradient of the Matern-3/2 kernel function
7171
with the left argument set to x with respect to y for the active_dims.
7272
73-
Parameters
73+
Parameters
7474
----------
7575
x : array-like
7676
First input array.

mellon/util.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,18 @@ def distance_grad(x, eps=1e-12):
385385
function
386386
A function that, when called with an array-like `y` of shape (m, d), returns a tuple
387387
containing:
388-
- distance : ndarray
389-
An array of shape (n, m) representing the Euclidean distances from each point in `x`
390-
to each point in `y`.
391-
- gradient : ndarray
392-
An array of shape (n, m, d) representing the gradient of the distance with respect to
393-
each point in `y`.
388+
389+
- **distance** : ndarray
390+
An array of shape (n, m) representing the Euclidean distances from each point in `x`
391+
to each point in `y`.
392+
393+
- **gradient** : ndarray
394+
An array of shape (n, m, d) representing the gradient of the distance with respect to
395+
each point in `y`.
394396
395397
Examples
396398
--------
399+
>>> import numpy as np
397400
>>> x = np.array([[0, 0], [1, 1]])
398401
>>> dist_grad_func = distance_grad(x)
399402
>>> y = np.array([[1, 0], [0, 1]])

0 commit comments

Comments
 (0)