KeyError followed by AttributeError while calling .closest_vector() [closed]

asked 2021-09-06 04:53:24 +0200

Max Alekseyev gravatar image

updated 2021-09-06 21:22:48 +0200

The following code gives me weird KeyError: ((None,), ()) followed by AttributeError: 'sage.symbolic.expression.Expression' object has no attribute 'ceil'

from sage.modules.free_module_integer import IntegerLattice                                                                                                                                                                                                               
L = IntegerLattice([[-1,  0,  1],[1,0,2]])                                                                                                                                                                                                                                

I see it even at SageCell -

What is wrong?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Max Alekseyev
close date 2021-11-10 17:23:50.979436


Which version of sage? Not the same error, but still an error with 9.5.b0

FrédéricC gravatar imageFrédéricC ( 2021-09-06 10:22:28 +0200 )edit

The error on sagemathcell is not the same as the one you give. It rather comes from abs of the basis vectors being symbolic expressions sqrt(2) and sqrt(5).

FrédéricC gravatar imageFrédéricC ( 2021-09-06 10:24:19 +0200 )edit

I"m using Sage 9.4. At sagecell it's the same error - it's KeyError followed by AttributeError. You seem to talk about the second one.

Max Alekseyev gravatar imageMax Alekseyev ( 2021-09-06 13:46:17 +0200 )edit

The real error comes from sqrt(5).ceil() not working..

FrédéricC gravatar imageFrédéricC ( 2021-09-06 20:31:00 +0200 )edit

I've reported this in ticket

Max Alekseyev gravatar imageMax Alekseyev ( 2021-09-08 00:18:50 +0200 )edit