Fixed a lurking bug in ascii.py.

When writing p (instead of q), the dimensions of the array were set wrongly in ascii.py.  This PR fixes that.