# HG changeset patch
# User Jason Grout <jason.grout@drake.edu>
# Date 1288928205 18000
# Node ID 7bd8ff0b77921209536d6766ee7d957807134171
# Parent 120c07be6358d93bcff503363d379c26b8342f2b
#10220: Make some imports local to improve Sage startup time
diff -r 120c07be6358 -r 7bd8ff0b7792 sage/groups/perm_gps/cubegroup.py
|
a
|
b
|
|
| 107 | 107 | from sage.rings.finite_rings.constructor import FiniteField as GF |
| 108 | 108 | from sage.rings.arith import factor |
| 109 | 109 | from sage.groups.abelian_gps.abelian_group import AbelianGroup |
| 110 | | from sage.plot.all import polygon, text |
| | 110 | from sage.plot.polygon import polygon |
| | 111 | from sage.plot.text import text |
| 111 | 112 | pi = RDF.pi() |
| 112 | 113 | |
| 113 | 114 | |
| 114 | | from sage.plot.plot3d.shapes import * |
| | 115 | from sage.plot.plot3d.shapes import Box |
| 115 | 116 | from sage.plot.plot3d.texture import Texture |
| 116 | 117 | |
| 117 | 118 | ####################### predefined colors ################## |
diff -r 120c07be6358 -r 7bd8ff0b7792 sage/misc/sage_input.py
|
a
|
b
|
|
| 160 | 160 | |
| 161 | 161 | """ |
| 162 | 162 | |
| 163 | | from sage.misc.functional import parent |
| 164 | 163 | import math |
| 165 | 164 | |
| 166 | 165 | ########################################################################## |
| … |
… |
|
| 446 | 445 | # However, we don't want to assume that hashing x is always |
| 447 | 446 | # efficient, so we only try the lookup if some value of the same |
| 448 | 447 | # type as x has been cached. |
| | 448 | from sage.misc.functional import parent |
| | 449 | |
| 449 | 450 | if type(x) in self._cached_types: |
| 450 | 451 | v = self._cache.get((parent(x), x)) |
| 451 | 452 | if v is not None: return v |
| … |
… |
|
| 655 | 656 | GF_101 = GF(101) |
| 656 | 657 | GF_101(42) + GF_101(43) |
| 657 | 658 | """ |
| | 659 | from sage.misc.functional import parent |
| | 660 | |
| 658 | 661 | self._cached_types.add(type(x)) |
| 659 | 662 | self._cache[(parent(x), x)] = sie |
| 660 | 663 | sie._sie_preferred_varname = name |
diff -r 120c07be6358 -r 7bd8ff0b7792 sage/misc/sage_timeit.py
|
a
|
b
|
|
| 9 | 9 | -- William Stein, based on code by Fernando Perez included in IPython |
| 10 | 10 | """ |
| 11 | 11 | |
| 12 | | import timeit as timeit_, time, math, preparser, interpreter |
| 13 | 12 | |
| 14 | 13 | class SageTimeitResult(): |
| 15 | 14 | r""" |
| … |
… |
|
| 141 | 140 | True |
| 142 | 141 | |
| 143 | 142 | """ |
| | 143 | import timeit as timeit_, time, math, preparser, interpreter |
| 144 | 144 | number=int(number) |
| 145 | 145 | repeat=int(repeat) |
| 146 | 146 | precision=int(precision) |
diff -r 120c07be6358 -r 7bd8ff0b7792 sage/plot/complex_plot.pyx
|
a
|
b
|
|
| 23 | 23 | include "../ext/interrupt.pxi" |
| 24 | 24 | |
| 25 | 25 | cimport numpy as cnumpy |
| 26 | | import numpy |
| 27 | 26 | |
| 28 | 27 | from sage.plot.primitive import GraphicPrimitive |
| 29 | 28 | from sage.plot.misc import options |