summaryrefslogtreecommitdiff
path: root/examples/backends
diff options
context:
space:
mode:
authorRĂ©mi Flamary <remi.flamary@gmail.com>2023-03-24 10:13:59 +0100
committerGitHub <noreply@github.com>2023-03-24 10:13:59 +0100
commit981fbe3873d7c1c121499bf83557f6d72425bf69 (patch)
tree9a5472b5da421169ccdf7db7a970e6ff261ed5b3 /examples/backends
parent897026ea1f5c35ba9e881433bc61490e70776b8c (diff)
[WIP] Build donc in GH Action and report warnings + move contributing and code of conduct in documentation (#441)
* use action for doc with wraning visible * remove space * remove space again * test pre commands * install pot properly * install compiler... * try composite action * remoe warning in sliced exmaple * pep8 * move contributing and code of conduct * cleanup * underline too short * update quickstart * replace version selector by static list to avoid jsQuery bug
Diffstat (limited to 'examples/backends')
-rw-r--r--examples/backends/plot_ssw_unif_torch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/backends/plot_ssw_unif_torch.py b/examples/backends/plot_ssw_unif_torch.py
index d1de5a9..7ccc2af 100644
--- a/examples/backends/plot_ssw_unif_torch.py
+++ b/examples/backends/plot_ssw_unif_torch.py
@@ -50,7 +50,7 @@ def plot_sphere(ax):
r = np.linspace(1.0, 1.0, 50)
X, Y = np.meshgrid(xlist, ylist)
- Z = np.sqrt(r**2 - X**2 - Y**2)
+ Z = np.sqrt(np.maximum(r**2 - X**2 - Y**2, 0))
ax.plot_wireframe(X, Y, Z, color="gray", alpha=.3)
ax.plot_wireframe(X, Y, -Z, color="gray", alpha=.3) # Now plot the bottom half