Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

KeyError while calling .closest_vector()

The following code gives me weird KeyError: ((None,), ())

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

I see it even at SageCell - https://sagecell.sagemath.org/?q=bznwmz

What is wrong?

KeyError while calling .closest_vector()

The following code gives me weird KeyError: ((None,), ())

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

I see it even at SageCell - https://sagecell.sagemath.org/?q=bznwmz

What is wrong?

KeyError followed by AttributeError while calling .closest_vector()

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]])                                                                                                                                                                                                                                
L.closest_vector((1,1,1))

I see it even at SageCell - https://sagecell.sagemath.org/?q=bznwmz

What is wrong?

KeyError followed by AttributeError while calling .closest_vector()

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]])                                                                                                                                                                                                                                
L.closest_vector((1,1,1))

I see it even at SageCell - https://sagecell.sagemath.org/?q=bznwmz

What is wrong?