-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
sage.calculus
: Modularization fixes, doctest cosmetics, # needs
#35717
sage.calculus
: Modularization fixes, doctest cosmetics, # needs
#35717
Conversation
….misc.dev_tools test happy
sage.calculus
: Modularization fixessage.calculus
: Modularization fixes, doctest cosmetics, # optional
src/sage/calculus/transforms/dft.py
Outdated
sage: A = [exp(-2*pi*i*I/5) for i in J] | ||
sage: s = IndexedSequence(A,J) | ||
sage: s.dct() | ||
sage: A = [exp(-2*pi*i*I/5) for i in J] # optional - sage.symbolic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one really uses the symbolic pi
and e
, but could easily be rewritten to use some other familiar sequence like the triangular numbers
src/sage/calculus/transforms/dwt.pyx
Outdated
sage: for i in range(1800): a[2048-i-1] = 0 | ||
sage: a.backward_transform() | ||
sage: a.plot().show() # long time (7s on sage.math, 2011) | ||
sage: for i in range(2048): a[i]=float(sin((i*5/2048)**2)) # optional - sage.symbolic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float(sin(x))
can be math.sin(x)
src/sage/structure/nonexact.py
Outdated
@@ -19,7 +19,7 @@ | |||
sage: R.<x> = PowerSeriesRing(QQ, default_prec=10) | |||
sage: R.default_prec() | |||
10 | |||
sage: cos(x) | |||
sage: cos(x) # optional - sage.symbolic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does using x.cos()
bypass the symbolic cosine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not needs sage.symbolic
?
SageMath version 10.1.beta4, Release Date: 2023-06-21
SageMath version 10.1.beta5, Release Date: 2023-07-01
SageMath version 10.1.beta6, Release Date: 2023-07-09
…be all src/sage/calculus
sage.calculus
: Modularization fixes, doctest cosmetics, # optional
sage.calculus
: Modularization fixes, doctest cosmetics, # needs
… 'not tested' yet
SageMath version 10.1.beta8, Release Date: 2023-07-30
@@ -1,3 +1,4 @@ | |||
# sage.doctest: optional - sage.symbolic | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs sage.symbolic
would work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed (in all files)
@@ -71,20 +71,20 @@ | |||
# | |||
# https://www.gnu.org/licenses/ | |||
########################################################################## | |||
from sage.rings.number_field.number_field import CyclotomicField | |||
from sage.functions.all import sin, cos | |||
from sage.misc.lazy_import import lazy_import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this (importing from all
) all right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not enforced for sage.functions yet, but I've changed it
Documentation preview for this PR (built with commit e1decf3; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed checks seem unrelated with this PR. Otherwise LGTM.
I leave setting positive review to @orlitzky.
Don't wait for me, I got busy and now all of my sage installs are broken. |
OK. Good wishes for your sage installs! |
Thanks both! |
📚 Description
Not all of
sage.calculus
is for symbolic calculus. We change some import statements tolazy_import
so that some modules can be loaded even when the symbolic subsystem is not present, or move them into methods.We also add
# needs
tags to doctests to enable doctesting of modularized distributions.📝 Checklist
⌛ Dependencies