void-packages/srcpkgs/sagemath/patches/trac-33398-fix_doctest_sympy_1.10-609dd9deaeaa6380ab2f0d50276d911233c00a04.patch
Gonzalo Tornaría 300bcb86a8 sagemath: rebuild for package updates
- compatibility with lrcalc 2.1 (trac #31355)
 - fix doctests for ipython-8.1 (trac #33170)
 - fix doctests for scipy-1.8 (trac #33336)
 - fix doctests for sympy-1.10 (trac #33398)
 - fix doctests when sphinx is installed (trac #33585)
 - use new package threejs-sage for 3d plots
2022-04-04 22:22:54 +02:00

100 lines
4.8 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 609dd9deaeaa6380ab2f0d50276d911233c00a04 Mon Sep 17 00:00:00 2001
From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
Date: Fri, 4 Mar 2022 16:07:09 -0800
Subject: sage.manifolds: Update doctests for SymPy 1.10
---
src/sage/manifolds/continuous_map.py | 3 +--
src/sage/manifolds/differentiable/diff_form.py | 4 ++--
src/sage/manifolds/differentiable/tensorfield.py | 8 ++++----
src/sage/manifolds/vector_bundle_fiber_element.py | 2 +-
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/sage/manifolds/continuous_map.py b/src/sage/manifolds/continuous_map.py
index a6356e7..f6f9b6d 100644
--- a/src/sage/manifolds/continuous_map.py
+++ b/src/sage/manifolds/continuous_map.py
@@ -1357,8 +1357,7 @@ class ContinuousMap(Morphism):
sage: Phi.coord_functions(c_uv, c_xyz)
Coordinate functions (u*v, u/v, u + v) on the Chart (M, (u, v))
sage: Phi.coord_functions(c_UV, c_xyz)
- Coordinate functions (-U**2/4 + V**2/4, -(U + V)/(U - V), V)
- on the Chart (M, (U, V))
+ Coordinate functions (-U**2/4 + V**2/4, (-U - V)/(U - V), V) on the Chart (M, (U, V))
sage: Phi.coord_functions(c_UV, c_XYZ)
Coordinate functions ((-U**3 + U**2*V + U*V**2 + 2*U*V + 6*U - V**3
- 2*V**2 + 6*V)/(2*(U - V)), (U**3/4 - U**2*V/4 - U*V**2/4 + U*V
diff --git a/src/sage/manifolds/differentiable/diff_form.py b/src/sage/manifolds/differentiable/diff_form.py
index 70dd8fb..0aa3469 100644
--- a/src/sage/manifolds/differentiable/diff_form.py
+++ b/src/sage/manifolds/differentiable/diff_form.py
@@ -266,7 +266,7 @@ class DiffForm(TensorField):
sage: s = a.wedge(b)
sage: s.display(eU)
- a∧b = -x*(2*x*y + 1) dx∧dy
+ a∧b = x*(-2*x*y - 1) dx∧dy
sage: s.display(eV)
a∧b = (u**3/8 + u**2*v/8 - u*v**2/8 + u/4 - v**3/8 + v/4) du∧dv
@@ -275,7 +275,7 @@ class DiffForm(TensorField):
sage: f = M.scalar_field({c_xy: (x+y)^2, c_uv: u^2}, name='f')
sage: s = f*a
sage: s.display(eU)
- f*a = -y*(x**2 + 2*x*y + y**2) dx + x*(x**2 + 2*x*y + y**2) dy
+ f*a = y*(-x**2 - 2*x*y - y**2) dx + x*(x**2 + 2*x*y + y**2) dy
sage: s.display(eV)
f*a = u**2*v/2 du - u**3/2 dv
diff --git a/src/sage/manifolds/differentiable/tensorfield.py b/src/sage/manifolds/differentiable/tensorfield.py
index 2775be9..6bc5c50 100644
--- a/src/sage/manifolds/differentiable/tensorfield.py
+++ b/src/sage/manifolds/differentiable/tensorfield.py
@@ -334,7 +334,7 @@ class TensorField(ModuleElementWithMutability):
sage: f.display() # long time
t(a,b): S^2 →
on U: (x, y) ↦ -2*x*y - 3*x - y**2
- on V: (u, v) ↦ -(3*u**3 + 3*u*v**2 + 2*u*v + v**2)/(u**4 + 2*u**2*v**2 + v**4)
+ on V: (u, v) ↦ (-3*u**3 - 3*u*v**2 - 2*u*v - v**2)/(u**4 + 2*u**2*v**2 + v**4)
The vectors can be defined only on subsets of `S^2`, the domain of the
result is then the common subset::
@@ -343,12 +343,12 @@ class TensorField(ModuleElementWithMutability):
sage: s.display() # long time
t(a,b): U →
(x, y) ↦ -2*x*y - 3*x - y**2
- on W: (u, v) ↦ -(3*u**3 + 3*u*v**2 + 2*u*v + v**2)/(u**4 + 2*u**2*v**2 + v**4)
+ on W: (u, v) ↦ (-3*u**3 - 3*u*v**2 - 2*u*v - v**2)/(u**4 + 2*u**2*v**2 + v**4)
sage: s = t(a.restrict(U), b.restrict(W)) # long time
sage: s.display() # long time
t(a,b): W →
(x, y) ↦ -2*x*y - 3*x - y**2
- (u, v) ↦ -(3*u**3 + 3*u*v**2 + 2*u*v + v**2)/(u**4 + 2*u**2*v**2 + v**4)
+ (u, v) ↦ (-3*u**3 - 3*u*v**2 - 2*u*v - v**2)/(u**4 + 2*u**2*v**2 + v**4)
The tensor itself can be defined only on some open subset of `S^2`,
yielding a result whose domain is this subset::
@@ -356,7 +356,7 @@ class TensorField(ModuleElementWithMutability):
sage: s = t.restrict(V)(a,b) # long time
sage: s.display() # long time
t(a,b): V →
- (u, v) ↦ -(3*u**3 + 3*u*v**2 + 2*u*v + v**2)/(u**4 + 2*u**2*v**2 + v**4)
+ (u, v) ↦ (-3*u**3 - 3*u*v**2 - 2*u*v - v**2)/(u**4 + 2*u**2*v**2 + v**4)
on W: (x, y) ↦ -2*x*y - 3*x - y**2
Tests regarding the multiplication by a scalar field::
diff --git a/src/sage/manifolds/vector_bundle_fiber_element.py b/src/sage/manifolds/vector_bundle_fiber_element.py
index 29ee81d..048275a 100644
--- a/src/sage/manifolds/vector_bundle_fiber_element.py
+++ b/src/sage/manifolds/vector_bundle_fiber_element.py
@@ -110,4 +110,4 @@ class VectorBundleFiberElement(FiniteRankFreeModuleElement):
desc += str(self._name) + " "
desc += "in the fiber of {} at {}".format(self._vbundle._name,
self._point)
- return desc
\ No newline at end of file
+ return desc
--
cgit v1.0-1-gd88e