sage.calculus: Modularization fixes, doctest cosmetics, # needs#35717
sage.calculus: Modularization fixes, doctest cosmetics, # needs#35717vbraun merged 29 commits intosagemath:developfrom
sage.calculus: Modularization fixes, doctest cosmetics, # needs#35717Conversation
….misc.dev_tools test happy
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.
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.
float(sin(x)) can be math.sin(x)
src/sage/structure/nonexact.py
Outdated
| sage: R.default_prec() | ||
| 10 | ||
| sage: cos(x) | ||
| sage: cos(x) # optional - sage.symbolic |
There was a problem hiding this comment.
Does using x.cos() bypass the symbolic cosine?
There was a problem hiding this comment.
Why not needs sage.symbolic?
SageMath version 10.1.beta4, Release Date: 2023-06-21
…ge.symbolic.constants
|
OK, how's this version? |
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
… '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.
needs sage.symbolic would work?
There was a problem hiding this comment.
Thanks, fixed (in all files)
| ########################################################################## | ||
| 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.
Is this (importing from all) all right?
There was a problem hiding this comment.
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! 🎉 |
|
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.calculusis for symbolic calculus. We change some import statements tolazy_importso that some modules can be loaded even when the symbolic subsystem is not present, or move them into methods.We also add
# needstags to doctests to enable doctesting of modularized distributions.📝 Checklist
⌛ Dependencies