Skip to content

Commit ce1a966

Browse files
committed
Rename coerce_to_context -> project_to_context
1 parent 93de55a commit ce1a966

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/flint/flint_base/flint_base.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,9 @@ cdef class flint_mpoly(flint_elem):
965965
)
966966
return new_ctx, self.coerce_to_context(new_ctx)
967967

968-
def coerce_to_context(self, other_ctx, mapping: dict[str | int, str | int] = None):
968+
def project_to_context(self, other_ctx, mapping: dict[str | int, str | int] = None):
969969
"""
970-
Coerce this polynomial to a different context.
970+
Project this polynomial to a different context.
971971
972972
This is equivalent to composing this polynomial with the generators of another
973973
context. By default the mapping between contexts is inferred based on the name
@@ -979,9 +979,9 @@ cdef class flint_mpoly(flint_elem):
979979
>>> ctx2 = fmpz_mpoly_ctx.get(('a', 'b'))
980980
>>> x, y, a, b = ctx.gens()
981981
>>> f = x + 2*y + 3*a + 4*b
982-
>>> f.coerce_to_context(ctx2)
982+
>>> f.project_to_context(ctx2)
983983
3*a + 4*b
984-
>>> f.coerce_to_context(ctx2, mapping={"x": "a", "b": 0})
984+
>>> f.project_to_context(ctx2, mapping={"x": "a", "b": 0})
985985
5*a
986986
"""
987987
cdef:

src/flint/types/fmpz_mod_mpoly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ cdef class fmpz_mod_mpoly(flint_mpoly):
949949
return c, res
950950

951951
# TODO: Rethink context conversions, particularly the proposed methods in #132
952-
# def coerce_to_context(self, ctx):
952+
# def project_to_context(self, ctx):
953953
# cdef:
954954
# fmpz_mod_mpoly res
955955
# slong *C

src/flint/types/nmod_mpoly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ cdef class nmod_mpoly(flint_mpoly):
927927
return constant, res
928928

929929
# TODO: Rethink context conversions, particularly the proposed methods in #132
930-
# def coerce_to_context(self, ctx):
930+
# def project_to_context(self, ctx):
931931
# cdef:
932932
# nmod_mpoly res
933933
# slong *C

0 commit comments

Comments
 (0)