Skip to content

Commit

Permalink
fix readthedocs linkcode_url error
Browse files Browse the repository at this point in the history
  • Loading branch information
katosh committed Dec 12, 2024
1 parent 8c78fc0 commit 152f205
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def get_version(rel_path):
if os.environ.get('READTHEDOCS') == 'True':
extensions.append("sphinx_github_style")

# sphinx_github_style config
linkcode_url = "https://github.com/settylab/Mellon"

source_suffix = [".rst", ".md"]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion mellon/cov.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def k_grad(self, x):
Produce a function that computes the gradient of the Matern-3/2 kernel function
with the left argument set to x with respect to y for the active_dims.
Parameters
Parameters
----------
x : array-like
First input array.
Expand Down
15 changes: 9 additions & 6 deletions mellon/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,18 @@ def distance_grad(x, eps=1e-12):
function
A function that, when called with an array-like `y` of shape (m, d), returns a tuple
containing:
- distance : ndarray
An array of shape (n, m) representing the Euclidean distances from each point in `x`
to each point in `y`.
- gradient : ndarray
An array of shape (n, m, d) representing the gradient of the distance with respect to
each point in `y`.
- **distance** : ndarray
An array of shape (n, m) representing the Euclidean distances from each point in `x`
to each point in `y`.
- **gradient** : ndarray
An array of shape (n, m, d) representing the gradient of the distance with respect to
each point in `y`.
Examples
--------
>>> import numpy as np
>>> x = np.array([[0, 0], [1, 1]])
>>> dist_grad_func = distance_grad(x)
>>> y = np.array([[1, 0], [0, 1]])
Expand Down

0 comments on commit 152f205

Please sign in to comment.