You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop labels keyword in parents & make parents more unique
Switch to templates for elements
Switch to cython for precision lattice
Specialized data structure for matrix
Make pickling and conversion more robust (pickling should dump the full lattice matrix and unpickling restores the matrix but puts it next to the existing matrix)
Share precision lattice between all parents with the same p.
About pickling/unpickling, I propose the following interface:
(usual syntax) if x is a p-adic, dumps(x) saves x as approx + O(p^prec) but diffused digits implying x are not saved
if R is a parent (and/or a precision lattice maybe), R.dumps_elements(x,y,z,...) saves the approximation of all listed elements together with a lattice representing the precision on this set of elements
loads(obj) loads the stored variables in obj (they can be many of them if obj was constructed by dumps_elements) as new independant variables.
I am not sure how dumps_elements would integrate with the usual pickling workflow, say when pickling something like a matrix.
I think a simpler interface is not harder implement and makes things less surprising:
Whenever we pickle an element we pickle its entire precision lattice. So, if we happen to pickle many elements at the same time, say a polynomial, we pickle their lattice (once.)
Restoring elements just appends the pickled lattice to the existing lattice and does a "drop unused columns".
While this is not a very space-efficient format (but I guess we don't care) it gives us both behaviours you describe above automatically, doesn't it?
Depends on #23505
CC: @roed314 @xcaruso @sagetrac-TristanVaccon
Component: padics
Keywords: lattice precision
Issue created by migration from https://trac.sagemath.org/ticket/24809
The text was updated successfully, but these errors were encountered: