NameError: name 'AffineCurve_GF' is not defined

asked 2014-03-24 17:24:28 -0500

cjsh gravatar image

updated 2014-03-25 04:37:48 -0500

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 07:52:04 -0500 )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 06:47:44 -0500 )edit