Numeric + wxPython, can't understand a bug...
John Ladasky
ladasky at my-deja.com
Sat Apr 28 07:06:00 EDT 2007
On Apr 27, 9:40 pm, Robert Kern <robert.k... at gmail.com> wrote:
> wx.Point objects are being recognized as sequences by array(). Consequently,
> reshape() thinks you are trying to reshape a (height*width, 2) array into a
> (height, width) array. You might want to create an empty (height, width)
> PyObject array first, and simply assign wx.Point values into it. That bypasses
> array()'s attempt at intuiting the structure of the list.
Thanks for the heads-up, Robert. I did as you suggested, and it works
fine. I'll need to read more about Numeric's array init procedure --
what it does it not immediately obvious to a newcomer.
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Ladasky Home Solar, Inc.: blowing sunshine up your |
| power grid since March 24, 2005. Fiat lux! |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Uptime Downtime kWh generated kWh consumed |
| 744 days 13 hours 12886 14321 |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
More information about the Python-list
mailing list