Skip to content

Commit 9d572f1

Browse files
author
Jake Moss
committed
Just disable the method all the time. Set ordering is not stable
1 parent d4a0a74 commit 9d572f1

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/flint/flint_base/flint_base.pyx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ cdef class flint_mpoly_context(flint_elem):
430430
"""
431431
return cls.get(
432432
names=ctx.names() if names is None else names,
433-
ordering=ctx.ordering() if ordering is None else names,
433+
ordering=ctx.ordering() if ordering is None else ordering,
434434
)
435435

436436
def _any_as_scalar(self, other):
@@ -493,8 +493,11 @@ cdef class flint_mpoly_context(flint_elem):
493493
>>> from flint import fmpz_mpoly_ctx
494494
>>> ctx = fmpz_mpoly_ctx.get(('x', 'y', 'z', 'a', 'b'))
495495
>>> ctx2 = fmpz_mpoly_ctx.get(('b', 'a'))
496-
>>> ctx.infer_generator_mapping(ctx2)
496+
>>> mapping = ctx.infer_generator_mapping(ctx2)
497+
>>> mapping # doctest: +SKIP
497498
{3: 1, 4: 0}
499+
>>> list(sorted(mapping.items())) # Set ordering is not stable
500+
[(3, 1), (4, 0)]
498501
"""
499502
gens_to_idxs = {x: i for i, x in enumerate(self.names())}
500503
other_gens_to_idxs = {x: i for i, x in enumerate(ctx.names())}

src/flint/flintlib/types/flint.pxd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ cdef extern from *:
5151
#define flint_rand_init flint_randinit
5252
#define flint_rand_clear flint_randclear
5353
54-
/* Functions added in Flint 3.2.0 */
55-
#define fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) (void)0
56-
5754
#endif
55+
56+
/* FIXME: add version guard when https://github.com/flintlib/flint/pull/2068 */
57+
/* is resolved */
58+
#define fmpz_mod_mpoly_compose_fmpz_mod_mpoly_gen(...) (void)0
5859
"""
5960

6061
cdef extern from "flint/flint.h":

0 commit comments

Comments
 (0)