[Numpy-discussion] numpy array serialization with JSON

Christopher Barker Chris.Barker@noaa....
Mon Nov 10 12:18:21 CST 2008

Matthieu Brucher wrote:
> Last time I checked, repr() does the same thing as str(): the middle
> of the array may not be displayed...

right. darn -- is that controllable?

It also breaks the axum:

eval(repr(x)) == x

but I guess with big arrays, this in one of those times that:

"Practicality beats Purity"

is there a pretty print option that could be used?

I can't help thinking there must be an array=>text function somewhere in 
numpy already. If not, there probably should be!


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the Numpy-discussion mailing list