From 12c99af73e048f3d87784ef6162a550292c74ef5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 8 Sep 2023 15:15:50 -0700 Subject: [PATCH 1/2] Replace relative cimports --- .../polyhedron/combinatorial_polyhedron/base.pxd | 8 ++++---- .../polyhedron/combinatorial_polyhedron/base.pyx | 6 +++--- .../combinatorial_face.pxd | 6 +++--- .../combinatorial_face.pyx | 14 +++++++------- .../combinatorial_polyhedron/conversions.pxd | 3 ++- .../combinatorial_polyhedron/conversions.pyx | 4 ++-- .../combinatorial_polyhedron/face_iterator.pxd | 8 ++++---- .../combinatorial_polyhedron/face_iterator.pyx | 9 ++++----- .../face_list_data_structure.pxd | 2 +- .../combinatorial_polyhedron/list_of_faces.pxd | 2 +- .../combinatorial_polyhedron/list_of_faces.pyx | 2 +- .../polyhedron_face_lattice.pxd | 8 ++++---- .../polyhedron_face_lattice.pyx | 8 ++++---- src/sage/geometry/triangulation/base.pyx | 4 ++-- .../automorphism_group_canonical_label.pxd | 2 +- .../automorphism_group_canonical_label.pyx | 2 +- .../perm_gps/partn_ref/canonical_augmentation.pxd | 6 +++--- .../perm_gps/partn_ref/canonical_augmentation.pyx | 2 +- .../groups/perm_gps/partn_ref/double_coset.pxd | 2 +- .../groups/perm_gps/partn_ref/double_coset.pyx | 2 +- .../perm_gps/partn_ref/refinement_binary.pxd | 4 ++-- .../perm_gps/partn_ref/refinement_binary.pyx | 4 ++-- .../perm_gps/partn_ref/refinement_graphs.pxd | 8 ++++---- .../perm_gps/partn_ref/refinement_graphs.pyx | 4 ++-- .../groups/perm_gps/partn_ref/refinement_lists.pxd | 2 +- .../groups/perm_gps/partn_ref/refinement_lists.pyx | 4 ++-- .../perm_gps/partn_ref/refinement_matrices.pxd | 4 ++-- .../perm_gps/partn_ref/refinement_matrices.pyx | 6 +++--- .../perm_gps/partn_ref/refinement_python.pxd | 2 +- .../perm_gps/partn_ref/refinement_python.pyx | 6 +++--- .../groups/perm_gps/partn_ref/refinement_sets.pxd | 6 +++--- .../groups/perm_gps/partn_ref/refinement_sets.pyx | 4 ++-- src/sage/numerical/backends/cvxopt_backend.pyx | 2 +- src/sage/numerical/backends/cvxopt_sdp_backend.pyx | 2 +- src/sage/numerical/backends/glpk_backend.pxd | 2 +- src/sage/numerical/backends/glpk_exact_backend.pxd | 2 +- src/sage/numerical/backends/matrix_sdp_backend.pxd | 3 ++- src/sage/numerical/backends/matrix_sdp_backend.pyx | 2 +- src/sage/numerical/backends/ppl_backend.pyx | 2 +- src/sage/numerical/backends/scip_backend.pxd | 2 +- src/sage/plot/plot3d/base.pyx | 2 +- src/sage/plot/plot3d/index_face_set.pxd | 8 ++++++-- src/sage/plot/plot3d/index_face_set.pyx | 2 +- src/sage/plot/plot3d/parametric_surface.pxd | 5 +++-- src/sage/plot/plot3d/parametric_surface.pyx | 2 +- src/sage/plot/plot3d/shapes.pxd | 5 ++++- src/sage/plot/plot3d/shapes.pyx | 4 ++-- 47 files changed, 104 insertions(+), 95 deletions(-) diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd index 030c9defa45..70755f2206c 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd @@ -1,10 +1,10 @@ cimport cython from sage.data_structures.list_of_pairs cimport ListOfPairs from sage.structure.sage_object cimport SageObject -from .face_iterator cimport FaceIterator, CombinatorialFace -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .polyhedron_face_lattice cimport PolyhedronFaceLattice +from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator, CombinatorialFace +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.polyhedron_face_lattice cimport PolyhedronFaceLattice @cython.final cdef class CombinatorialPolyhedron(SageObject): diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index 5a07abb2408..57bd6f1176e 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -98,14 +98,14 @@ from .conversions \ incidence_matrix_to_bit_rep_of_Vrep, \ facets_tuple_to_bit_rep_of_facets, \ facets_tuple_to_bit_rep_of_Vrep -from .conversions cimport Vrep_list_to_bit_rep +from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport Vrep_list_to_bit_rep from sage.misc.cachefunc import cached_method from sage.rings.integer cimport smallInteger from cysignals.signals cimport sig_check -from .face_data_structure cimport face_len_atoms, face_init, face_free -from .face_iterator cimport iter_t, parallel_f_vector +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_len_atoms, face_init, face_free +from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport iter_t, parallel_f_vector cdef extern from "Python.h": diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd index 9193a5417a9..5c80654faf3 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd @@ -1,8 +1,8 @@ cimport cython from sage.structure.sage_object cimport SageObject -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .face_iterator cimport FaceIterator +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator @cython.final cdef class CombinatorialFace(SageObject): diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index bf01025707f..5651ff3e6ea 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -68,13 +68,13 @@ from cysignals.memory cimport check_allocarray, sig_free import numbers from sage.rings.integer cimport smallInteger -from .conversions cimport bit_rep_to_Vrep_list -from .base cimport CombinatorialPolyhedron -from .face_iterator cimport FaceIterator_base, FaceStatus -from .polyhedron_face_lattice cimport PolyhedronFaceLattice -from .face_data_structure cimport face_len_atoms, face_init, face_free, face_copy, face_issubset -from .face_list_data_structure cimport bit_rep_to_coatom_rep -from .list_of_faces cimport face_as_combinatorial_polyhedron +from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list +from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron +from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator_base, FaceStatus +from sage.geometry.polyhedron.combinatorial_polyhedron.polyhedron_face_lattice cimport PolyhedronFaceLattice +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_len_atoms, face_init, face_free, face_copy, face_issubset +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport bit_rep_to_coatom_rep +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport face_as_combinatorial_polyhedron cdef extern from "Python.h": diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd index 82ac7f6dcb8..2a0e950b469 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd @@ -1,4 +1,5 @@ -from .face_list_data_structure cimport face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_t + cdef int Vrep_list_to_bit_rep(tuple Vrep_list, face_t output) except -1 diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx index baeb8fc4855..26aa92a6575 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx @@ -72,8 +72,8 @@ from memory_allocator cimport MemoryAllocator from sage.matrix.matrix_dense cimport Matrix_dense -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_next_atom, face_add_atom_safe, facet_set_coatom, face_clear +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_next_atom, face_add_atom_safe, facet_set_coatom, face_clear cdef extern from "Python.h": int unlikely(int) nogil # Defined by Cython diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd index 1dd74505306..c0fe019cbbb 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd @@ -1,9 +1,9 @@ cimport cython from sage.structure.sage_object cimport SageObject -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .face_list_data_structure cimport face_list_t -from .combinatorial_face cimport CombinatorialFace +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t +from sage.geometry.polyhedron.combinatorial_polyhedron.combinatorial_face cimport CombinatorialFace cdef enum FaceStatus: NOT_INITIALIZED diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index f03f0f832ff..919dfd080c1 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -176,14 +176,13 @@ AUTHOR: from cython.parallel cimport prange, threadid from cysignals.memory cimport check_allocarray, sig_free +from cysignals.signals cimport sig_check from memory_allocator cimport MemoryAllocator -from cysignals.signals cimport sig_check -from .conversions cimport bit_rep_to_Vrep_list -from .base cimport CombinatorialPolyhedron - +from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron +from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport * from sage.geometry.polyhedron.face import combinatorial_face_to_polyhedral_face, PolyhedronFace -from .face_list_data_structure cimport * cdef extern from "Python.h": diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd index 79b319e1982..cd6d6d24333 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd @@ -14,7 +14,7 @@ Inline cython methods for lists of faces. cdef extern from "Python.h": int unlikely(int) nogil # Defined by Cython -from .face_data_structure cimport * +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport * from libc.string cimport memset from cysignals.signals cimport sig_check from cysignals.memory cimport check_allocarray, check_calloc, sig_free diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd index d16065979eb..6f2728c99ff 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd @@ -1,5 +1,5 @@ cimport cython -from .face_list_data_structure cimport face_list_t, face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t, face_t @cython.final cdef class ListOfFaces: diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx index dffa76036fa..da065bf0d6d 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx @@ -92,7 +92,7 @@ AUTHOR: from sage.matrix.matrix_dense cimport Matrix_dense -from .face_list_data_structure cimport * +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport * cdef extern from "Python.h": int unlikely(int) nogil # Defined by Cython diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd index 4e7987b0d7a..9b42c80ab8a 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd @@ -1,8 +1,8 @@ cimport cython -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .face_list_data_structure cimport face_list_t -from .combinatorial_face cimport CombinatorialFace +from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces +from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t +from sage.geometry.polyhedron.combinatorial_polyhedron.combinatorial_face cimport CombinatorialFace @cython.final cdef class PolyhedronFaceLattice: diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx index be6ffbda794..05a9e9d1d9a 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx @@ -64,11 +64,11 @@ from .conversions \ import facets_tuple_to_bit_rep_of_facets, \ facets_tuple_to_bit_rep_of_Vrep -from .conversions cimport bit_rep_to_Vrep_list +from sage.geometry.polyhedron.combinatorial_polyhedron.conversions cimport bit_rep_to_Vrep_list -from .base cimport CombinatorialPolyhedron -from .face_iterator cimport FaceIterator -from .face_list_data_structure cimport * +from sage.geometry.polyhedron.combinatorial_polyhedron.base cimport CombinatorialPolyhedron +from sage.geometry.polyhedron.combinatorial_polyhedron.face_iterator cimport FaceIterator +from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport * cdef extern from "Python.h": diff --git a/src/sage/geometry/triangulation/base.pyx b/src/sage/geometry/triangulation/base.pyx index d66186db098..c4d284a12c8 100644 --- a/src/sage/geometry/triangulation/base.pyx +++ b/src/sage/geometry/triangulation/base.pyx @@ -27,8 +27,8 @@ from sage.structure.parent cimport Parent from sage.categories.sets_cat import Sets from sage.matrix.constructor import matrix -from .functions cimport binomial -from .triangulations cimport \ +from sage.geometry.triangulation.functions cimport binomial +from sage.geometry.triangulation.triangulations cimport \ triangulations_ptr, init_triangulations, next_triangulation, delete_triangulations diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd index 5fe1ebd140d..4c24d59a17a 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd @@ -8,7 +8,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset cimport bitset_t from sage.rings.integer cimport Integer diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index 04d978afef3..da9dfac8285 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -113,7 +113,7 @@ REFERENCE: from libc.string cimport memcmp, memcpy from cysignals.memory cimport sig_malloc, sig_realloc, sig_free -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset_base cimport * cdef inline int agcl_cmp(int a, int b): diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd index dfcf347df4c..a8ae659a5ac 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd @@ -17,13 +17,13 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space, allocate_agcl_output, deallocate_agcl_output, allocate_agcl_work_space, deallocate_agcl_work_space) -from .double_coset cimport (double_coset, +from sage.groups.perm_gps.partn_ref.double_coset cimport (double_coset, dc_work_space, allocate_dc_work_space, deallocate_dc_work_space) diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx index 680dbf5675d..805c3e3fa63 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx @@ -169,7 +169,7 @@ REFERENCE: from cysignals.memory cimport sig_malloc, sig_free -from .data_structures cimport* +from sage.groups.perm_gps.partn_ref.data_structures cimport* cdef void *canonical_generator_next(void *can_gen_data, int *degree, bint *mem_err): diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pxd b/src/sage/groups/perm_gps/partn_ref/double_coset.pxd index 7db1b7764c3..fcb1880ffd7 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pxd +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pxd @@ -8,7 +8,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset cimport bitset_t from sage.rings.integer cimport Integer diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx index e3c7bc75f05..0c4ae28d2ce 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx @@ -96,7 +96,7 @@ REFERENCE: from cysignals.memory cimport sig_calloc -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset_base cimport * # Functions diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd index 005142f8bc7..67ea83ef756 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd @@ -8,9 +8,9 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space, allocate_agcl_output, deallocate_agcl_output, allocate_agcl_work_space, deallocate_agcl_work_space) diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index 06f548f4b7c..5fdb5803944 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -28,10 +28,10 @@ REFERENCE: #***************************************************************************** from sage.data_structures.bitset_base cimport * -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.rings.integer cimport Integer from sage.structure.element import is_Matrix -from .double_coset cimport double_coset +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset cdef class LinearBinaryCodeStruct(BinaryCodeStruct): diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd index f26580d3010..464ddde015d 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd @@ -8,17 +8,17 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.graphs.base.c_graph cimport CGraph -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space, allocate_agcl_output, deallocate_agcl_output, allocate_agcl_work_space, deallocate_agcl_work_space) -from .canonical_augmentation cimport (iterator, +from sage.groups.perm_gps.partn_ref.canonical_augmentation cimport (iterator, canonical_generator_data, allocate_cgd, deallocate_cgd, canonical_generator_next, setup_canonical_generator, start_canonical_generator) -from .refinement_sets cimport (subset, free_subset, all_set_children_are_equivalent, +from sage.groups.perm_gps.partn_ref.refinement_sets cimport (subset, free_subset, all_set_children_are_equivalent, refine_set, compare_sets, generate_child_subsets, apply_subset_aug, canonical_set_parent, allocate_sgd, deallocate_sgd, allocate_subset_gen, free_subset_gen, setup_set_gen, subset_generator_next, subset_generator_data, allocate_subset_gen_2) diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx index cafe8a26c75..f683be1fe02 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx @@ -20,12 +20,12 @@ REFERENCE: # https://www.gnu.org/licenses/ # **************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset_base cimport * from sage.rings.integer cimport Integer from sage.graphs.base.sparse_graph cimport SparseGraph from sage.graphs.base.dense_graph cimport DenseGraph, copy_dense_graph -from .double_coset cimport double_coset +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset def isomorphic(G1, G2, partn, ordering2, dig, use_indicator_function, sparse=False): diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd index 898dfa97528..691dbce64d7 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd @@ -9,7 +9,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * # name of the three functions to customize diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx index 5942edd5438..3c2a504ccc1 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx @@ -20,8 +20,8 @@ EXAMPLES:: from cysignals.memory cimport sig_malloc, sig_free -from .data_structures cimport * -from .double_coset cimport double_coset, int_cmp +from sage.groups.perm_gps.partn_ref.data_structures cimport * +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset, int_cmp def is_isomorphic(self, other): diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd index 0273291f014..ac485f81f6c 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd @@ -8,9 +8,9 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space, allocate_agcl_output, deallocate_agcl_output, allocate_agcl_work_space, deallocate_agcl_work_space) diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index e2388616a34..3b919fa8928 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -28,12 +28,12 @@ REFERENCE: from libc.string cimport memcmp -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * from sage.data_structures.bitset_base cimport * from sage.rings.integer cimport Integer from sage.matrix.constructor import Matrix -from .refinement_binary cimport NonlinearBinaryCodeStruct, refine_by_bip_degree -from .double_coset cimport double_coset +from sage.groups.perm_gps.partn_ref.refinement_binary cimport NonlinearBinaryCodeStruct, refine_by_bip_degree +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset cdef class MatrixStruct: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd index 1c13cb9c337..9f46107a1c1 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd @@ -8,7 +8,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * +from sage.groups.perm_gps.partn_ref.data_structures cimport * cdef class PythonPartitionStack: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx index 4d53f3a0332..2fea70526aa 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx @@ -32,11 +32,11 @@ debugger. from cysignals.memory cimport sig_malloc, sig_free -from .data_structures cimport * -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.data_structures cimport * +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, deallocate_agcl_output) -from .double_coset cimport double_coset +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset from sage.rings.integer cimport Integer diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd index 19f60c7f153..981a188918a 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd @@ -17,12 +17,12 @@ AUTHORS: # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * -from .automorphism_group_canonical_label cimport ( +from sage.groups.perm_gps.partn_ref.data_structures cimport * +from sage.groups.perm_gps.partn_ref.automorphism_group_canonical_label cimport ( get_aut_gp_and_can_lab, aut_gp_and_can_lab, agcl_work_space, allocate_agcl_output, deallocate_agcl_output, allocate_agcl_work_space, deallocate_agcl_work_space) -from .canonical_augmentation cimport (iterator, +from sage.groups.perm_gps.partn_ref.canonical_augmentation cimport (iterator, canonical_generator_data, allocate_cgd, deallocate_cgd, canonical_generator_next, setup_canonical_generator, start_canonical_generator) diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx index 7affe0cd965..0b4dd4b0dd8 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx @@ -26,8 +26,8 @@ REFERENCE: # http://www.gnu.org/licenses/ #***************************************************************************** -from .data_structures cimport * -from .double_coset cimport double_coset +from sage.groups.perm_gps.partn_ref.data_structures cimport * +from sage.groups.perm_gps.partn_ref.double_coset cimport double_coset from sage.data_structures.bitset_base cimport * diff --git a/src/sage/numerical/backends/cvxopt_backend.pyx b/src/sage/numerical/backends/cvxopt_backend.pyx index 22bdfd20ea6..372e66e4110 100644 --- a/src/sage/numerical/backends/cvxopt_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_backend.pyx @@ -18,7 +18,7 @@ AUTHORS: #***************************************************************************** from sage.numerical.mip import MIPSolverException -from .generic_backend cimport GenericBackend +from sage.numerical.backends.generic_backend cimport GenericBackend from copy import copy diff --git a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx index bb999559ee2..79461a3c33a 100644 --- a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx @@ -21,7 +21,7 @@ AUTHORS: from sage.numerical.sdp import SDPSolverException from sage.matrix.constructor import Matrix -from .matrix_sdp_backend cimport MatrixSDPBackend +from sage.numerical.backends.matrix_sdp_backend cimport MatrixSDPBackend cdef class CVXOPTSDPBackend(MatrixSDPBackend): diff --git a/src/sage/numerical/backends/glpk_backend.pxd b/src/sage/numerical/backends/glpk_backend.pxd index 03dbe2c8688..ec263a729e4 100644 --- a/src/sage/numerical/backends/glpk_backend.pxd +++ b/src/sage/numerical/backends/glpk_backend.pxd @@ -9,7 +9,7 @@ #***************************************************************************** from sage.libs.glpk.types cimport glp_prob, glp_iocp, glp_smcp -from .generic_backend cimport GenericBackend +from sage.numerical.backends.generic_backend cimport GenericBackend # search_tree_data_t: diff --git a/src/sage/numerical/backends/glpk_exact_backend.pxd b/src/sage/numerical/backends/glpk_exact_backend.pxd index ed55d9bce3e..8207347ce51 100644 --- a/src/sage/numerical/backends/glpk_exact_backend.pxd +++ b/src/sage/numerical/backends/glpk_exact_backend.pxd @@ -8,7 +8,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .glpk_backend cimport GLPKBackend +from sage.numerical.backends.glpk_backend cimport GLPKBackend cdef class GLPKExactBackend(GLPKBackend): cpdef int add_variable(self, lower_bound=*, upper_bound=*, binary=*, continuous=*, integer=*, obj=*, name=*) except -1 diff --git a/src/sage/numerical/backends/matrix_sdp_backend.pxd b/src/sage/numerical/backends/matrix_sdp_backend.pxd index 4ebbf01a16d..9038955f83a 100644 --- a/src/sage/numerical/backends/matrix_sdp_backend.pxd +++ b/src/sage/numerical/backends/matrix_sdp_backend.pxd @@ -1,4 +1,5 @@ -from .generic_sdp_backend cimport GenericSDPBackend +from sage.numerical.backends.generic_sdp_backend cimport GenericSDPBackend + cdef class MatrixSDPBackend(GenericSDPBackend): diff --git a/src/sage/numerical/backends/matrix_sdp_backend.pyx b/src/sage/numerical/backends/matrix_sdp_backend.pyx index 7668c64ecc1..dc8588c71ef 100644 --- a/src/sage/numerical/backends/matrix_sdp_backend.pyx +++ b/src/sage/numerical/backends/matrix_sdp_backend.pyx @@ -21,7 +21,7 @@ other classes implementing solvers. #***************************************************************************** from sage.matrix.constructor import Matrix -from .generic_sdp_backend cimport GenericSDPBackend +from sage.numerical.backends.generic_sdp_backend cimport GenericSDPBackend cdef class MatrixSDPBackend(GenericSDPBackend): diff --git a/src/sage/numerical/backends/ppl_backend.pyx b/src/sage/numerical/backends/ppl_backend.pyx index 03b54b34359..a37c49be597 100644 --- a/src/sage/numerical/backends/ppl_backend.pyx +++ b/src/sage/numerical/backends/ppl_backend.pyx @@ -23,7 +23,7 @@ from sage.numerical.mip import MIPSolverException from ppl import MIP_Problem, Variable, Variables_Set, Linear_Expression from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational -from .generic_backend cimport GenericBackend +from sage.numerical.backends.generic_backend cimport GenericBackend from copy import copy diff --git a/src/sage/numerical/backends/scip_backend.pxd b/src/sage/numerical/backends/scip_backend.pxd index dc4981a89c3..0cd0600f955 100644 --- a/src/sage/numerical/backends/scip_backend.pxd +++ b/src/sage/numerical/backends/scip_backend.pxd @@ -8,7 +8,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .generic_backend cimport GenericBackend +from sage.numerical.backends.generic_backend cimport GenericBackend cdef class SCIPBackend(GenericBackend): diff --git a/src/sage/plot/plot3d/base.pyx b/src/sage/plot/plot3d/base.pyx index 85510d0c33a..bccc3e76b99 100644 --- a/src/sage/plot/plot3d/base.pyx +++ b/src/sage/plot/plot3d/base.pyx @@ -64,7 +64,7 @@ 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 .transform cimport Transformation, point_c, face_c +from sage.plot.plot3d.transform cimport Transformation, point_c, face_c include "point_c.pxi" from sage.interfaces.tachyon import tachyon_rt diff --git a/src/sage/plot/plot3d/index_face_set.pxd b/src/sage/plot/plot3d/index_face_set.pxd index 3b42507ff62..5a81bd32de1 100644 --- a/src/sage/plot/plot3d/index_face_set.pxd +++ b/src/sage/plot/plot3d/index_face_set.pxd @@ -1,5 +1,6 @@ -from .base cimport PrimitiveObject -from .transform cimport point_c, face_c, color_c +from sage.plot.plot3d.base cimport PrimitiveObject +from sage.plot.plot3d.transform cimport point_c, face_c, color_c + cdef class IndexFaceSet(PrimitiveObject): cdef bint enclosed @@ -13,15 +14,18 @@ cdef class IndexFaceSet(PrimitiveObject): # array used as storage for _faces[i].vertices cdef int* face_indices + cdef class FaceIter: cdef Py_ssize_t i cdef IndexFaceSet set + cdef class EdgeIter: cdef Py_ssize_t i, j cdef object seen cdef IndexFaceSet set + cdef class VertexIter: cdef Py_ssize_t i cdef IndexFaceSet set diff --git a/src/sage/plot/plot3d/index_face_set.pyx b/src/sage/plot/plot3d/index_face_set.pyx index 3968db3ab51..32e7ce935eb 100644 --- a/src/sage/plot/plot3d/index_face_set.pyx +++ b/src/sage/plot/plot3d/index_face_set.pyx @@ -62,7 +62,7 @@ from sage.plot.colors import Color, float_to_integer from sage.plot.plot3d.base import Graphics3dGroup from sage.plot.plot3d.texture import Texture -from .transform cimport Transformation +from sage.plot.plot3d.transform cimport Transformation # -------------------------------------------------------------------- diff --git a/src/sage/plot/plot3d/parametric_surface.pxd b/src/sage/plot/plot3d/parametric_surface.pxd index 47265921622..82ac1164f8a 100644 --- a/src/sage/plot/plot3d/parametric_surface.pxd +++ b/src/sage/plot/plot3d/parametric_surface.pxd @@ -1,5 +1,6 @@ -from .index_face_set cimport IndexFaceSet -from .transform cimport point_c +from sage.plot.plot3d.index_face_set cimport IndexFaceSet +from sage.plot.plot3d.transform cimport point_c + cdef class ParametricSurface(IndexFaceSet): cdef object f diff --git a/src/sage/plot/plot3d/parametric_surface.pyx b/src/sage/plot/plot3d/parametric_surface.pyx index 11676df7dfe..9c09e6e7cb9 100644 --- a/src/sage/plot/plot3d/parametric_surface.pyx +++ b/src/sage/plot/plot3d/parametric_surface.pyx @@ -123,7 +123,7 @@ from sage.rings.real_double import RDF from sage.plot.colors import check_color_data from .base import RenderParams -from .transform cimport point_c, face_c +from sage.plot.plot3d.transform cimport point_c, face_c from sage.ext.interpreters.wrapper_rdf cimport Wrapper_rdf include "point_c.pxi" diff --git a/src/sage/plot/plot3d/shapes.pxd b/src/sage/plot/plot3d/shapes.pxd index 37a85c19223..d01e2a7460d 100644 --- a/src/sage/plot/plot3d/shapes.pxd +++ b/src/sage/plot/plot3d/shapes.pxd @@ -1,4 +1,4 @@ -from .parametric_surface cimport ParametricSurface +from sage.plot.plot3d.parametric_surface cimport ParametricSurface cdef class Cone(ParametricSurface): @@ -6,13 +6,16 @@ cdef class Cone(ParametricSurface): cdef double height cdef bint closed + cdef class Cylinder(ParametricSurface): cdef double radius cdef double height cdef bint closed + cdef class Sphere(ParametricSurface): cdef double radius + cdef class Torus(ParametricSurface): cdef double R, r diff --git a/src/sage/plot/plot3d/shapes.pyx b/src/sage/plot/plot3d/shapes.pyx index f5c98fe3929..73717922468 100644 --- a/src/sage/plot/plot3d/shapes.pyx +++ b/src/sage/plot/plot3d/shapes.pyx @@ -57,8 +57,8 @@ 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 .index_face_set cimport IndexFaceSet, PrimitiveObject -from .transform cimport point_c +from sage.plot.plot3d.index_face_set cimport IndexFaceSet, PrimitiveObject +from sage.plot.plot3d.transform cimport point_c # Helper function to check that Box input is right From b9b9bc80d9e59a1365766aba5106208cd6d48c0f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 6 Sep 2023 20:25:37 -0700 Subject: [PATCH 2/2] 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: