pretty print 2D arrays

A

Alan G Isaac

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
 
C

Colin J. Williams

Alan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top