From b9b9bc80d9e59a1365766aba5106208cd6d48c0f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 6 Sep 2023 20:25:37 -0700 Subject: [PATCH] Replace relative imports in Cython files --- src/sage/groups/matrix_gps/group_element.pyx | 2 +- src/sage/plot/plot3d/base.pyx | 8 ++++---- src/sage/plot/plot3d/index_face_set.pyx | 2 +- src/sage/plot/plot3d/parametric_surface.pyx | 2 +- src/sage/plot/plot3d/shapes.pyx | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sage/groups/matrix_gps/group_element.pyx b/src/sage/groups/matrix_gps/group_element.pyx index 2764e33a7a8..38bf1f03279 100644 --- a/src/sage/groups/matrix_gps/group_element.pyx +++ b/src/sage/groups/matrix_gps/group_element.pyx @@ -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 = () diff --git a/src/sage/plot/plot3d/base.pyx b/src/sage/plot/plot3d/base.pyx index bccc3e76b99..253f152130c 100644 --- a/src/sage/plot/plot3d/base.pyx +++ b/src/sage/plot/plot3d/base.pyx @@ -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" @@ -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) @@ -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) @@ -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), diff --git a/src/sage/plot/plot3d/index_face_set.pyx b/src/sage/plot/plot3d/index_face_set.pyx index 32e7ce935eb..6ac24479e67 100644 --- a/src/sage/plot/plot3d/index_face_set.pyx +++ b/src/sage/plot/plot3d/index_face_set.pyx @@ -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: diff --git a/src/sage/plot/plot3d/parametric_surface.pyx b/src/sage/plot/plot3d/parametric_surface.pyx index 9c09e6e7cb9..fa2fd91b550 100644 --- a/src/sage/plot/plot3d/parametric_surface.pyx +++ b/src/sage/plot/plot3d/parametric_surface.pyx @@ -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 diff --git a/src/sage/plot/plot3d/shapes.pyx b/src/sage/plot/plot3d/shapes.pyx index 73717922468..e184075b23b 100644 --- a/src/sage/plot/plot3d/shapes.pyx +++ b/src/sage/plot/plot3d/shapes.pyx @@ -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 @@ -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), @@ -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: