Skip to content

Commit

Permalink
Merge pull request pybamm-team#4219 from kratman/fix/tinyurl
Browse files Browse the repository at this point in the history
Fix lychee issues from tinyurl
  • Loading branch information
valentinsulzer authored Jun 26, 2024
2 parents 7ba74dc + 74381f7 commit e22d10c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
12 changes: 6 additions & 6 deletions pybamm/expression_tree/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ def linspace(start: float, stop: float, num: int = 50, **kwargs) -> pybamm.Array
"""
Creates a linearly spaced array by calling `numpy.linspace` with keyword
arguments 'kwargs'. For a list of 'kwargs' see the
`numpy linspace documentation <https://tinyurl.com/yc4ne47x>`_
`numpy linspace documentation
<https://numpy.org/doc/stable/reference/generated/numpy.linspace.html>`_
"""
return pybamm.Array(np.linspace(start, stop, num, **kwargs))

Expand All @@ -200,9 +201,8 @@ def meshgrid(
"""
Return coordinate matrices as from coordinate vectors by calling
`numpy.meshgrid` with keyword arguments 'kwargs'. For a list of 'kwargs'
see the `numpy meshgrid documentation <https://tinyurl.com/y8azewrj>`_
see the `numpy meshgrid documentation
<https://numpy.org/doc/stable/reference/generated/numpy.meshgrid.html>`_
"""
[X, Y] = np.meshgrid(x.entries, y.entries)
X = pybamm.Array(X)
Y = pybamm.Array(Y)
return X, Y
[x_grid, y_grid] = np.meshgrid(x.entries, y.entries)
return pybamm.Array(x_grid), pybamm.Array(y_grid)
3 changes: 1 addition & 2 deletions pybamm/parameters/parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ def update(self, values, check_conflict=False, check_already_exists=True, path="
+ "sure you want to update this parameter, use "
+ "param.update({{name: value}}, check_already_exists=False)"
) from err
# if no conflicts, update
if isinstance(value, str):
if (
value.startswith("[function]")
Expand All @@ -269,7 +268,7 @@ def update(self, values, check_conflict=False, check_already_exists=True, path="
"or [2D data] is no longer supported. For functions, pass in a "
"python function object. For data, pass in a python function "
"that returns a pybamm Interpolant object. "
"See https://tinyurl.com/merv43ss for an example with both."
"See the Ai2020 parameter set for an example with both."
)

elif value == "[input]":
Expand Down
6 changes: 2 additions & 4 deletions pybamm/plotting/plot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#
# Method for creating a 1D plot of pybamm arrays
#
import pybamm
from .quick_plot import ax_min, ax_max
from pybamm.util import import_optional_dependency
Expand All @@ -10,7 +7,8 @@ def plot(x, y, ax=None, show_plot=True, **kwargs):
"""
Generate a simple 1D plot. Calls `matplotlib.pyplot.plot` with keyword
arguments 'kwargs'. For a list of 'kwargs' see the
`matplotlib plot documentation <https://tinyurl.com/ycblw9bx>`_
`matplotlib plot documentation
<https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html>`_
Parameters
----------
Expand Down
6 changes: 2 additions & 4 deletions pybamm/plotting/plot2D.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#
# Method for creating a filled contour plot of pybamm arrays
#
import pybamm
from .quick_plot import ax_min, ax_max
from pybamm.util import import_optional_dependency
Expand All @@ -10,7 +7,8 @@ def plot2D(x, y, z, ax=None, show_plot=True, **kwargs):
"""
Generate a simple 2D plot. Calls `matplotlib.pyplot.contourf` with keyword
arguments 'kwargs'. For a list of 'kwargs' see the
`matplotlib contourf documentation <https://tinyurl.com/y8mnadtn>`_
`matplotlib contourf documentation
<https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.contourf.html>`_
Parameters
----------
Expand Down
5 changes: 3 additions & 2 deletions pybamm/solvers/algebraic_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class AlgebraicSolver(pybamm.BaseSolver):
The tolerance for the solver (default is 1e-6).
extra_options : dict, optional
Any options to pass to the rootfinder. Vary depending on which method is chosen.
Please consult `SciPy documentation <https://tinyurl.com/ybr6cfqs>`_ for
details.
Please consult `SciPy documentation
<https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.show_options.html>`_
for details.
"""

def __init__(self, method="lm", tol=1e-6, extra_options=None):
Expand Down
5 changes: 3 additions & 2 deletions pybamm/solvers/scipy_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class ScipySolver(pybamm.BaseSolver):
The tolerance to assert whether extrapolation occurs or not (default is 0).
extra_options : dict, optional
Any options to pass to the solver.
Please consult `SciPy documentation <https://tinyurl.com/yafgqg9y>`_ for
details.
Please consult `SciPy documentation
<https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html>`_
for details.
"""

def __init__(
Expand Down

0 comments on commit e22d10c

Please sign in to comment.