Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SageMath Snippets #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/cython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ category: Miscellaneous / Cython
title: "Cython Class"
descr: "Defines a [Cython](https://cython.org/) class"
code: |
%cython
%%cython
cdef class MyClass:
"""
This is a Cython class.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/numbertheory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ title: "Galois Group"
code: |
R.<x> = PolynomialRing(QQ)
K = NumberField(x^3 + x^2 - 2*x + 8, 'a')
K.galois_group(type="pari")
K.galois_group()
---
title: "Quotient Polynomial Ring"
code: |
Expand Down
8 changes: 4 additions & 4 deletions src/sage/russ_plotting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ descr: |
with the initial conditions $y(2) = 4$
looks like.
code: |
x = var('x')
x = var('x')
y = function('yy')(x)
eq = diff(y, x) == - y/x - x + 2
h = desolve(eq, y, [2, 4])
Expand All @@ -192,7 +192,7 @@ code: |

# substituting the solution for y(x) in the right hand side
substituted = eq.rhs().substitute_function(yy, sol)

y = var('y')
P1 = plot_slope_field( substituted, (x, 0, 6), (y, -5, 15), headlength = 4, headaxislength=3 )
P2 = plot( sol, (x, 0, 6), ymax=15, ymin=-5 )
P = P1 + P2
Expand Down Expand Up @@ -298,7 +298,7 @@ descr: >
---
title: 4 Points
code: |
show(points([(1,0), (sqrt(2)/2,sqrt(2)/2), (0,1), (1/2,1/2)], color='darkgreen', pointsize=50), aspect_ratio=1)
show(point([(1,0), (sqrt(2)/2,sqrt(2)/2), (0,1), (1/2,1/2)], color='darkgreen', pointsize=50), aspect_ratio=1)
---
title: Line with point at the end
code: |
Expand Down Expand Up @@ -377,7 +377,7 @@ descr: >
---
title: Text with formula
code: |
text(r"Text and LaTeX: $\\alpha^3 + 1$", (1,1), color="black", fontsize=15, rotation=30)
text(r"Text and LaTeX: $\alpha^3 + 1$", (1,1), color="black", fontsize=15, rotation=30)
---
title: Lines
code: |
Expand Down