|
97 | 97 | <class 'sage.knots.link.Link'>
|
98 | 98 |
|
99 | 99 | If you have `SnapPy <https://snappy.math.uic.edu/index.html>`__ installed inside
|
100 |
| -Sage you can obtain an instance of :class:`~spherogram.links.links_base.Link`, |
| 100 | +Sage, you can obtain an instance of :class:`~spherogram.links.links_base.Link`, |
101 | 101 | too::
|
102 | 102 |
|
| 103 | + sage: # optional - snappy |
103 | 104 | sage: L6 = KnotInfo.L6a1_0
|
104 |
| - sage: l6s = L6.link(snappy=True); l6s # optional - snappy |
| 105 | + sage: l6s = L6.link(snappy=True); l6s |
105 | 106 | Plink failed to import tkinter.
|
106 | 107 | <Link: 2 comp; 6 cross>
|
107 |
| -
|
108 |
| - sage: type(l6s) # optional - snappy |
| 108 | + sage: type(l6s) |
109 | 109 | <class 'spherogram.links.invariants.Link'>
|
110 | 110 | sage: l6 = L6.link()
|
111 |
| - sage: l6 == l6s.sage_link() # optional - snappy |
| 111 | + sage: l6 == l6s.sage_link() |
112 | 112 | True
|
113 |
| - sage: L6.link(L6.items.name, snappy=True) # optional - snappy |
| 113 | + sage: L6.link(L6.items.name, snappy=True) |
114 | 114 | <Link L6a1: 2 comp; 6 cross>
|
115 |
| - sage: l6sn = _ # optional - snappy |
116 |
| - sage: l6s == l6sn # optional - snappy |
| 115 | + sage: l6sn = _ |
| 116 | + sage: l6s == l6sn |
117 | 117 | False
|
118 |
| - sage: l6m = l6.mirror_image() # optional - snappy |
119 |
| - sage: l6sn.sage_link().is_isotopic(l6m) # optional - snappy |
| 118 | + sage: l6m = l6.mirror_image() |
| 119 | + sage: l6sn.sage_link().is_isotopic(l6m) |
120 | 120 | True
|
121 | 121 |
|
122 | 122 | But observe that the name conversion to SnapPy does not distinguish orientation
|
|
238 | 238 |
|
239 | 239 | from enum import Enum
|
240 | 240 | from sage.misc.cachefunc import cached_method
|
| 241 | +from sage.misc.lazy_import import lazy_import |
241 | 242 | from sage.misc.sage_eval import sage_eval
|
242 | 243 | from sage.structure.sage_object import SageObject
|
243 | 244 | from sage.structure.unique_representation import UniqueRepresentation
|
244 | 245 | from sage.rings.integer_ring import ZZ
|
245 |
| -from sage.groups.braid import BraidGroup |
246 | 246 | from sage.knots.knot import Knots
|
247 | 247 | from sage.databases.knotinfo_db import KnotInfoColumns, db
|
248 | 248 |
|
| 249 | +lazy_import('sage.groups.braid', 'BraidGroup') |
| 250 | + |
249 | 251 |
|
250 | 252 | def eval_knotinfo(string, locals={}, to_tuple=True):
|
251 | 253 | r"""
|
@@ -694,8 +696,7 @@ def braid_length(self):
|
694 | 696 | @cached_method
|
695 | 697 | def braid(self):
|
696 | 698 | r"""
|
697 |
| - Return the braid notation of self as an instance of :class:`~sage.groups.braid.Braid`. |
698 |
| -
|
| 699 | + Return the braid notation of ``self`` as an instance of :class:`~sage.groups.braid.Braid`. |
699 | 700 |
|
700 | 701 | EXAMPLES::
|
701 | 702 |
|
|
0 commit comments