Skip to content

Commit f3f4416

Browse files
committed
sage.manifolds: Use more block '# needs'
1 parent b9cc9d2 commit f3f4416

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

src/sage/manifolds/differentiable/tangent_vector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def plot(self, chart=None, ambient_coords=None, mapping=None,
433433
manifold S^2
434434
sage: graph_v = v.plot(mapping=F) # needs sage.plot
435435
sage: graph_S2 = XS.plot(chart=X3, mapping=F, number_values=9) # long time, needs sage.plot
436-
sage: graph_v + graph_S2 # long time
436+
sage: graph_v + graph_S2 # long time, needs sage.plot
437437
Graphics3d Object
438438
439439
.. PLOT::

src/sage/manifolds/point.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -900,18 +900,19 @@ def plot(self, chart=None, ambient_coords=None, mapping=None,
900900
An example of plot via a mapping: plot of a point on a 2-sphere viewed
901901
in the 3-dimensional space ``M``::
902902
903+
sage: # needs sage.plot
903904
sage: S2 = Manifold(2, 'S^2', structure='topological')
904905
sage: U = S2.open_subset('U') # the open set covered by spherical coord.
905906
sage: XS.<th,ph> = U.chart(r'th:(0,pi):\theta ph:(0,2*pi):\phi')
906907
sage: p = U.point((pi/4, pi/8), name='p')
907-
sage: F = S2.continuous_map(M, {(XS, X): [sin(th)*cos(ph), # needs sage.plot
908+
sage: F = S2.continuous_map(M, {(XS, X): [sin(th)*cos(ph),
908909
....: sin(th)*sin(ph), cos(th)]}, name='F')
909910
sage: F.display()
910911
F: S^2 → M
911912
on U: (th, ph) ↦ (x, y, z) = (cos(ph)*sin(th), sin(ph)*sin(th), cos(th))
912-
sage: g = p.plot(chart=X, mapping=F) # needs sage.plot
913-
sage: gS2 = XS.plot(chart=X, mapping=F, number_values=9) # needs sage.plot
914-
sage: g + gS2 # needs sage.plot
913+
sage: g = p.plot(chart=X, mapping=F)
914+
sage: gS2 = XS.plot(chart=X, mapping=F, number_values=9)
915+
sage: g + gS2
915916
Graphics3d Object
916917
917918
Use of the option ``ambient_coords`` for plots on a 4-dimensional

src/sage/manifolds/subsets/pullback.py

+26-21
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,15 @@ def __classcall_private__(cls, map, codomain_subset, inverse=None,
144144
145145
TESTS::
146146
147+
sage: # needs sage.geometry.polyhedron
147148
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback
148149
sage: M = Manifold(2, 'R^2', structure='topological')
149150
sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
150-
sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P # needs sage.geometry.polyhedron
151+
sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P
151152
A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices
152-
sage: S = ManifoldSubsetPullback(c_cart, P); S # needs sage.geometry.polyhedron
153+
sage: S = ManifoldSubsetPullback(c_cart, P); S
153154
Subset x_y_inv_P of the 2-dimensional topological manifold R^2
154-
sage: S is ManifoldSubsetPullback(c_cart, P) # needs sage.geometry.polyhedron
155+
sage: S is ManifoldSubsetPullback(c_cart, P)
155156
True
156157
157158
"""
@@ -605,16 +606,17 @@ def _an_element_(self):
605606
606607
EXAMPLES::
607608
609+
sage: # needs sage.geometry.polyhedron
608610
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback
609611
sage: M = Manifold(3, 'R^3', structure='topological')
610612
sage: c_cart.<x,y,z> = M.chart() # Cartesian coordinates on R^3
611-
sage: Cube = polytopes.cube(); Cube # needs sage.geometry.polyhedron
613+
sage: Cube = polytopes.cube(); Cube
612614
A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices
613-
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube # needs sage.geometry.polyhedron
615+
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube
614616
Subset McCube of the 3-dimensional topological manifold R^3
615-
sage: p = McCube.an_element(); p # needs sage.geometry.polyhedron
617+
sage: p = McCube.an_element(); p
616618
Point on the 3-dimensional topological manifold R^3
617-
sage: p.coordinates(c_cart) # needs sage.geometry.polyhedron
619+
sage: p.coordinates(c_cart)
618620
(0, 0, 0)
619621
620622
sage: # needs sage.geometry.polyhedron
@@ -638,21 +640,22 @@ def some_elements(self):
638640
639641
EXAMPLES::
640642
643+
sage: # needs sage.geometry.polyhedron
641644
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback
642645
sage: M = Manifold(3, 'R^3', structure='topological')
643646
sage: c_cart.<x,y,z> = M.chart() # Cartesian coordinates on R^3
644-
sage: Cube = polytopes.cube(); Cube # needs sage.geometry.polyhedron
647+
sage: Cube = polytopes.cube(); Cube
645648
A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices
646-
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube # needs sage.geometry.polyhedron
649+
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube
647650
Subset McCube of the 3-dimensional topological manifold R^3
648-
sage: L = list(McCube.some_elements()); L # needs sage.geometry.polyhedron
651+
sage: L = list(McCube.some_elements()); L
649652
[Point on the 3-dimensional topological manifold R^3,
650653
Point on the 3-dimensional topological manifold R^3,
651654
Point on the 3-dimensional topological manifold R^3,
652655
Point on the 3-dimensional topological manifold R^3,
653656
Point on the 3-dimensional topological manifold R^3,
654657
Point on the 3-dimensional topological manifold R^3]
655-
sage: list(p.coordinates(c_cart) for p in L) # needs sage.geometry.polyhedron
658+
sage: list(p.coordinates(c_cart) for p in L)
656659
[(0, 0, 0),
657660
(1, -1, -1),
658661
(1, 0, -1),
@@ -685,12 +688,13 @@ def __contains__(self, point):
685688
686689
EXAMPLES::
687690
691+
sage: # needs sage.geometry.polyhedron
688692
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback
689693
sage: M = Manifold(3, 'R^3', structure='topological')
690694
sage: c_cart.<x,y,z> = M.chart() # Cartesian coordinates on R^3
691-
sage: Cube = polytopes.cube(); Cube # needs sage.geometry.polyhedron
695+
sage: Cube = polytopes.cube(); Cube
692696
A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices
693-
sage: Cube.vertices_list() # needs sage.geometry.polyhedron
697+
sage: Cube.vertices_list()
694698
[[1, -1, -1],
695699
[1, 1, -1],
696700
[1, 1, 1],
@@ -699,15 +703,15 @@ def __contains__(self, point):
699703
[-1, -1, -1],
700704
[-1, 1, -1],
701705
[-1, 1, 1]]
702-
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube # needs sage.geometry.polyhedron
706+
sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube
703707
Subset McCube of the 3-dimensional topological manifold R^3
704-
sage: p = M.point((0, 0, 0)); p # needs sage.geometry.polyhedron
708+
sage: p = M.point((0, 0, 0)); p
705709
Point on the 3-dimensional topological manifold R^3
706-
sage: p in McCube # needs sage.geometry.polyhedron
710+
sage: p in McCube
707711
True
708-
sage: q = M.point((2, 3, 4)); q # needs sage.geometry.polyhedron
712+
sage: q = M.point((2, 3, 4)); q
709713
Point on the 3-dimensional topological manifold R^3
710-
sage: q in McCube # needs sage.geometry.polyhedron
714+
sage: q in McCube
711715
False
712716
"""
713717
if super().__contains__(point):
@@ -772,11 +776,12 @@ def is_closed(self):
772776
773777
The pullback of a (closed convex) polyhedron under a chart is closed::
774778
775-
sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P # needs sage.geometry.polyhedron
779+
sage: # needs sage.geometry.polyhedron
780+
sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P
776781
A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices
777-
sage: McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP # needs sage.geometry.polyhedron
782+
sage: McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP
778783
Subset McP of the 2-dimensional topological manifold R^2
779-
sage: McP.is_closed() # needs sage.geometry.polyhedron
784+
sage: McP.is_closed()
780785
True
781786
782787
The pullback of real vector subspaces under a chart is closed::

0 commit comments

Comments
 (0)