Ask Your Question
1

AttributeError: 'NumberFieldFractionalIdeal' object has no attribute 'ray_class_number'

asked 2014-01-24 00:32:14 -0600

cjsh gravatar image

updated 2014-01-29 08:16:17 -0600

ray_class_number canot run.....

I tried an example from doc/reference:

K.<z> = QuadraticField(-23);
p = K.primes_above(3)[0];
p.ray_class_number()

x = polygen(K)
L.<w> = K.extension(x^3 - z)
I = L.ideal(5)
I.ray_class_number()
edit retag flag offensive close merge delete

Comments

It works for me, i got: sage: I.ray_class_number() 5184 Could you please send us the error message ?

tmonteil gravatar imagetmonteil ( 2014-01-24 00:50:07 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-01-29 07:10:01 -0600

Jeroen Demeyer gravatar image

Version 5.12 of Sage is too old. This functionality was only added to Sage 5.13.

edit flag offensive delete link more

Comments

thank you very much! I try sagecell ,it is ok! why sagenb,org main page is 5.11?

cjsh gravatar imagecjsh ( 2014-01-29 17:19:02 -0600 )edit
0

answered 2014-01-27 21:32:00 -0600

cjsh gravatar image

updated 2014-01-29 08:18:54 -0600

sorry, I see your reply today.

in sagecloud:

sage: K.<z> = QuadraticField(-23);K
Number Field in z with defining polynomial x^2 + 23
sage: p = K.primes_above(3)[0];p
Fractional ideal (3, 1/2*z - 1/2)
sage: p.ray_class_number()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-12-8ba0cf693043> in <module>()
----> 1 p.ray_class_number()

/usr/local/sage/sage-5.12/local/lib/python2.7/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:3871)()

/usr/local/sage/sage-5.12/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1696)()

AttributeError: 'NumberFieldFractionalIdeal' object has no attribute 'ray_class_number'

in http://sagenb.skku.edu/

K.<z> = QuadraticField(-23); 
p = K.primes_above(3)[0]; 
p.ray_class_number()

Traceback (click to the left of this block for traceback)
...
AttributeError: 'NumberFieldFractionalIdeal' object has no attribute 'ray_class_number'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-01-24 00:32:14 -0600

Seen: 106 times

Last updated: Jan 29 '14