Skip to content

Commit

Permalink
Replace relative imports in Cython files
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Oct 30, 2023
1 parent 12c99af commit b9b9bc8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/sage/groups/matrix_gps/group_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ from sage.structure.richcmp cimport richcmp


try:
from .group_element_gap import MatrixGroupElement_gap
from sage.groups.matrix_gps.group_element_gap import MatrixGroupElement_gap
except ImportError:
MatrixGroupElement_gap = ()

Expand Down
8 changes: 4 additions & 4 deletions src/sage/plot/plot3d/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ from sage.misc.temporary_file import tmp_filename
from sage.misc.fast_methods cimport hash_by_id
from sage.modules.free_module_element import vector
from sage.rings.real_double import RDF
from .texture import Texture
from sage.plot.plot3d.texture import Texture
from sage.plot.plot3d.transform cimport Transformation, point_c, face_c
include "point_c.pxi"

Expand Down Expand Up @@ -502,7 +502,7 @@ cdef class Graphics3d(SageObject):
js_options['axesLabelsStyle'] = None

if js_options['axesLabelsStyle'] is not None:
from .shapes import _validate_threejs_text_style
from sage.plot.plot3d.shapes import _validate_threejs_text_style
style = js_options['axesLabelsStyle']
if isinstance(style, dict):
style = _validate_threejs_text_style(style)
Expand Down Expand Up @@ -1552,7 +1552,7 @@ end_scene""".format(
T = [xyz_min[i] - a_min[i] for i in range(3)]
X = X.translate(T)
if frame:
from .shapes2 import frame3d, frame_labels
from sage.plot.plot3d.shapes2 import frame3d, frame_labels
F = frame3d(xyz_min, xyz_max, opacity=0.5, color=(0,0,0), thickness=thickness)
if labels:
F += frame_labels(xyz_min, xyz_max, a_min_orig, a_max_orig)
Expand All @@ -1561,7 +1561,7 @@ end_scene""".format(

if axes:
# draw axes
from .shapes import arrow3d
from sage.plot.plot3d.shapes import arrow3d
A = (arrow3d((min(0,a_min[0]),0, 0), (max(0,a_max[0]), 0,0),
thickness, color="blue"),
arrow3d((0,min(0,a_min[1]), 0), (0, max(0,a_max[1]), 0),
Expand Down
2 changes: 1 addition & 1 deletion src/sage/plot/plot3d/index_face_set.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ cdef class IndexFaceSet(PrimitiveObject):
str(self.fcount + extra_faces),
faces]

from .base import flatten_list
from sage.plot.plot3d.base import flatten_list
name = render_params.unique_name('obj')
all = flatten_list(all)
if render_params.output_archive:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/plot/plot3d/parametric_surface.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ from math import cos, sin
from sage.rings.real_double import RDF

from sage.plot.colors import check_color_data
from .base import RenderParams
from sage.plot.plot3d.base import RenderParams
from sage.plot.plot3d.transform cimport point_c, face_c
from sage.ext.interpreters.wrapper_rdf cimport Wrapper_rdf

Expand Down
6 changes: 3 additions & 3 deletions src/sage/plot/plot3d/shapes.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ from libc.math cimport sqrt, sin, cos, acos, M_PI
from sage.rings.real_double import RDF
from sage.modules.free_module_element import vector
from sage.misc.decorators import rename_keyword
from .base import Graphics3dGroup
from sage.plot.plot3d.base import Graphics3dGroup
from sage.plot.plot3d.index_face_set cimport IndexFaceSet, PrimitiveObject
from sage.plot.plot3d.transform cimport point_c

Expand Down Expand Up @@ -245,7 +245,7 @@ def ColorCube(size, colors, opacity=1, **kwds):
all = []
kwds['opacity'] = opacity

from .texture import Texture
from sage.plot.plot3d.texture import Texture
for k in range(6):
all.append(IndexFaceSet([faces[k]], enclosed=True,
texture=Texture(colors[k], opacity=opacity),
Expand Down Expand Up @@ -1330,7 +1330,7 @@ def _validate_threejs_text_style(style):
"""
default_color = '#000000' # black
color = style.get('color', default_color)
from .texture import Texture
from sage.plot.plot3d.texture import Texture
try:
texture = Texture(color=color)
except ValueError:
Expand Down

0 comments on commit b9b9bc8

Please sign in to comment.