Skip to content

Commit 5faa4fb

Browse files
kachayevrflamary
andauthored
[DOC] Fix references to JAX and numpy functions (#475)
* Fix ref to JAX * Fix references to numpy.random.* * Typo in CONTRIBUTING * Removed :any: reference from func parameters * Make markup of params consistent with other docstrings * Mentioned latest open PR in RELEASES * Fix See Also references for ot.factored --------- Co-authored-by: Rémi Flamary <remi.flamary@gmail.com>
1 parent 8cc8dd2 commit 5faa4fb

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@ method does to the data and a figure (coming from an example)
199199
illustrating it.
200200

201201

202-
This Contribution guide is strongly inpired by the one of the [scikit-learn](https://github.com/scikit-learn/scikit-learn) team.
202+
This Contribution guide is strongly inspired by the one of the [scikit-learn](https://github.com/scikit-learn/scikit-learn) team.

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
- Fix circleci-redirector action and codecov (PR #460)
1414
- Fix issues with cuda for ot.binary_search_circle and with gradients for ot.sliced_wasserstein_sphere (PR #457)
15-
- Major documentation cleanup (PR #462, #467)
15+
- Major documentation cleanup (PR #462, #467, #475)
1616
- Fix gradients for "Wasserstein2 Minibatch GAN" example (PR #466)
1717
- Faster Bures-Wasserstein distance with NumPy backend (PR #468)
1818
- Fix issue backend for ot.sliced_wasserstein_sphere ot.sliced_wasserstein_sphere_unif (PR #471)

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,11 @@ def __getattr__(cls, name):
348348

349349
# Example configuration for intersphinx: refer to the Python standard library.
350350
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
351-
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
351+
'numpy': ('https://numpy.org/doc/stable/', None),
352352
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
353353
'matplotlib': ('http://matplotlib.org/', None),
354-
'torch': ('https://pytorch.org/docs/stable/', None)}
354+
'torch': ('https://pytorch.org/docs/stable/', None),
355+
'jax': ('https://jax.readthedocs.io/en/latest/', None)}
355356

356357
sphinx_gallery_conf = {
357358
'examples_dirs': ['../../examples', '../../examples/da'],

ot/backend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ def seed(self, seed=None):
680680
681681
This function follows the api from :any:`numpy.random.seed`
682682
683-
See: https://numpy.org/doc/stable/reference/generated/numpy.random.seed.html
683+
See: https://numpy.org/doc/stable/reference/random/generated/numpy.random.seed.html
684684
"""
685685
raise NotImplementedError()
686686

@@ -690,7 +690,7 @@ def rand(self, *size, type_as=None):
690690
691691
This function follows the api from :any:`numpy.random.rand`
692692
693-
See: https://numpy.org/doc/stable/reference/generated/numpy.random.rand.html
693+
See: https://numpy.org/doc/stable/reference/random/generated/numpy.random.rand.html
694694
"""
695695
raise NotImplementedError()
696696

@@ -700,7 +700,7 @@ def randn(self, *size, type_as=None):
700700
701701
This function follows the api from :any:`numpy.random.rand`
702702
703-
See: https://numpy.org/doc/stable/reference/generated/numpy.random.rand.html
703+
See: https://numpy.org/doc/stable/reference/random/generated/numpy.random.rand.html
704704
"""
705705
raise NotImplementedError()
706706

ot/factored.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def factored_optimal_transport(Xa, Xb, a=None, b=None, reg=0.0, r=100, X0=None,
8181
8282
See Also
8383
--------
84-
ot.bregman.sinkhorn : Entropic regularized OT ot.optim.cg : General
85-
regularized OT
84+
ot.bregman.sinkhorn : Entropic regularized OT
85+
ot.optim.cg : General regularized OT
8686
"""
8787

8888
nx = get_backend(Xa, Xb)

ot/solvers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def solve(M, a=None, b=None, reg=None, reg_type="KL", unbalanced=None,
2828
\lambda_u U(\mathbf{T}\mathbf{1},\mathbf{a}) +
2929
\lambda_u U(\mathbf{T}^T\mathbf{1},\mathbf{b})
3030
31-
The regularization is selected with :any:`reg` (:math:`\lambda_r`) and :any:`reg_type`. By
31+
The regularization is selected with `reg` (:math:`\lambda_r`) and `reg_type`. By
3232
default ``reg=None`` and there is no regularization. The unbalanced marginal
33-
penalization can be selected with :any:`unbalanced` (:math:`\lambda_u`) and
34-
:any:`unbalanced_type`. By default ``unbalanced=None`` and the function
33+
penalization can be selected with `unbalanced` (:math:`\lambda_u`) and
34+
`unbalanced_type`. By default ``unbalanced=None`` and the function
3535
solves the exact optimal transport problem (respecting the marginals).
3636
3737
Parameters
@@ -46,12 +46,12 @@ def solve(M, a=None, b=None, reg=None, reg_type="KL", unbalanced=None,
4646
Regularization weight :math:`\lambda_r`, by default None (no reg., exact
4747
OT)
4848
reg_type : str, optional
49-
Type of regularization :math:`R` either "KL", "L2", 'entropy', by default "KL"
49+
Type of regularization :math:`R` either "KL", "L2", "entropy", by default "KL"
5050
unbalanced : float, optional
5151
Unbalanced penalization weight :math:`\lambda_u`, by default None
5252
(balanced OT)
5353
unbalanced_type : str, optional
54-
Type of unbalanced penalization unction :math:`U` either "KL", "L2", 'TV', by default 'KL'
54+
Type of unbalanced penalization unction :math:`U` either "KL", "L2", "TV", by default "KL"
5555
n_threads : int, optional
5656
Number of OMP threads for exact OT solver, by default 1
5757
max_iter : int, optional

0 commit comments

Comments
 (0)