NameError: name 'AffineCurve_GF' is not defined

asked 2014-03-24 23:24:28 +0100

cjsh gravatar image

updated 2014-03-25 10:37:48 +0100

kcrisman gravatar image

I try code from here:

http://sage.math.washington.edu/home/...

sage: F = GF(5)
sage: A2 = AffineSpace(2, F, names = ’xy’)
sage: R = A2.coordinate_ring()
sage: x, y =R.gens()
sage: f = yˆ2 - xˆ9 - x
sage: C = AffineCurve_GF(A2,f)
sage: pts = C.rational_points(); pts



---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-1-8d275f477b7b> in <module>()
      4 x, y =R.gens()
      5 f = y**Integer(2) - x**Integer(9) - x
----> 6 C = AffineCurve_GF(A2,f)
      7 pts = C.rational_points(); pts

NameError: name 'AffineCurve_GF' is not defined

and copy code from pdf file,the "'" and "^" cannot show normal

edit retag flag offensive close merge delete

Comments

When I try to evaluate http://sage.math.washington.edu/home/wdj/research/rrbasis3.sage (where class AffineCurve_GF(AffineCurve_generic) is defined ) there are error : ImportError: cannot import name is_PrimeField .

moroplogo gravatar imagemoroplogo ( 2014-03-25 13:52:04 +0100 )edit

Yes - @cjsh, you need to be more careful in trying to use very old code from alpha versions of Sage. It's always worth checking whether the major functions even *exist* in current Sage.

kcrisman gravatar imagekcrisman ( 2014-03-27 12:47:44 +0100 )edit