First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 13 years ago

KKondo gravatar image

AttributeError: 'int' object has no attribute 'mod'

Hello,

How can I solve the problem with an error message: "AttributeError: 'int' object has no attribute 'mod'" when executing the following program?

maxdeg = 5 maxord = maxdeg for m in range(maxord + 1): for l in range(m, maxdeg + 1): print l, m, gen_legendre_P(l, m, z), l.mod(2).is_zero()

Sincerely, KKondo

click to hide/show revision 2
No.2 Revision

AttributeError: 'int' object has no attribute 'mod'

Hello,

How can I solve the problem with an error message: "AttributeError: 'int' object has no attribute 'mod'" when executing the following program?

maxdeg = 5
maxord = maxdeg
for m in range(maxord + 1):
    for l in range(m, maxdeg + 1):
        print l, m, gen_legendre_P(l, m, z), l.mod(2).is_zero()

z) # this uses "l.mod(2).is_zero()."

Sincerely, KKondo