You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conversion from pari to Sage uses the global namespace:
sage: QQ['s'].gen()._pari_().sage()
Traceback (most recent call last):
...
NameError: name 's' is not defined
sage: GF(9, 'a').gen()._pari_().sage()
Traceback (most recent call last):
...
NameError: name 'a' is not defined
I'm sure roed knows this, but the correct call syntax here is:
sage: sage: R = QQ['s']
sage: sage: t = R.gen()._pari_()
sage: sage: R(t)
s
sage: F = GF(9, 'a')
sage: t = F.gen()._pari_()
sage: F(t)
a
After all, PARI has no class hierarchy, so why should a PARI univariate polynomial be expected to know which Sage polynomial ring it should convert back to?
If I were feeling provocative, I might go further and propose that the sage method of a PARI object should be deprecated in favor of the constructor syntax shown above, even for PARI types where there isn't any ambiguity about the Sage parent (e.g., integers).
Conversion from pari to Sage uses the global namespace:
We can do better.
Component: interfaces
Issue created by migration from https://trac.sagemath.org/ticket/14194
The text was updated successfully, but these errors were encountered: