pretty print 2D arrays
Colin J. Williams
cjw at sympatico.ca
Thu Aug 12 20:25:50 EDT 2004
Alan G Isaac wrote:
> I figure someone must have done this nicely but
> I can't find it. I'd like structured printing of 2D
> arrays, where an entry of None or '' should be
> printed as whitespace. Something like:
>
> Inputs: 2D array, 1D array of fixed field widths, 1D array of format
> suggestions
> Effect: formatted print of the 2D array (or its transpose)
>
> Thanks,
> Alan Isaac
>
You might consider numarray, but you would have to make your own
provision for Null entries.
Colin W.
More information about the Python-list
mailing list