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

Remove abuse of predefined x in doctests #32721

Closed
mkoeppe opened this issue Oct 19, 2021 · 4 comments · Fixed by #35648
Closed

Remove abuse of predefined x in doctests #32721

mkoeppe opened this issue Oct 19, 2021 · 4 comments · Fixed by #35648

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Oct 19, 2021

For example in src/sage/rings/number_field/number_field.py

        sage: K.<a> = NumberField(x^2 - 2)

This leads to numerous errors when sage.symbolic is not available (#32601).

CC: @tscrim @orlitzky

Component: refactoring

Issue created by migration from https://trac.sagemath.org/ticket/32721

@mkoeppe mkoeppe added this to the sage-9.5 milestone Oct 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@slel
Copy link
Member

slel commented Feb 2, 2022

comment:3

Many NumberField and FiniteField definitions
use a polynomial in x.

The corresponding documentation examples
would be improved by first defining x as:

sage: x = polygen(ZZ)

@slel
Copy link
Member

slel commented Feb 2, 2022

comment:4

Many calculus and plotting examples use a symbolic variable x.

The corresponding documentation examples
would be improved by first defining x as:

sage: x = SR.var('x')

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 2, 2022

comment:5

Perhaps, but that's not in the scope of this ticket.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 3, 2022

comment:6

Some of these fixes are done in #32609.

@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 7, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe modified the milestones: sage-10.0, sage-10.1 Apr 30, 2023
@vbraun vbraun closed this as completed May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants