On Sat, Jan 28, 2012 at 04:36:17PM +0100, Julien Puydt wrote: > Le 29/01/2012 12:13, Willem Jan Palenstijn a écrit : > >So this is the same issue with char being unsigned on your platform. > >Specifically, it seems the corresponding __reduce__ function converts a char > >array into a list of python ints, which has range 0-255 for you, instead of > >the > >-128-127 on x86. And the unpickle function has the opposite issue. > > > >I wonder how many of these are around, and if there is any general fix for > >them. > > Well, if there is a nice inheritance graph, there's hope fixing the > base class will maket the rest just go smooth. > > Now, to fix the base class... If the goal is to take a "char" on one > platform and turn it into a "char" on another, then it's a lost > battle.
Which base class do you mean exactly? > What are those "char" really encoding? If they are really "foo", > then turning a "foo" on one platform into a "foo" on another might > not be impossible! In this particular case, it seems Matrix_mod2_dense's __reduce__ serializes its data by compressing it as a black/white PNG image. So it's really just a raw byte stream. -Willem Jan -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org