supporting old versions of Numeric


Old versions of Numeric (specifically, version 21) don't have symbols such at UInt8 defined. I modified nc_imports to deal with this case, but I wanted to fly it past the experts in case it misses some subtle intricacy.

Furthermore, I get the following bug when trying to run examples/ on Windows XP, matplotlib 0.54, Numeric 21. Is this fixable?

Traceback (most recent call last):
  File "", line 16, in ?
  File "C:\Python22\Lib\site-packages\matplotlib\backends\", line 1124, in show
  File "C:\Python22\Lib\site-packages\matplotlib\backends\", line 50, in draw
  File "C:\Python22\Lib\site-packages\matplotlib\backends\", line 299, in draw
  File "C:\Python22\Lib\site-packages\matplotlib\", line 128, in draw
    for a in self.axes: a.draw(renderer)
  File "C:\Python22\Lib\site-packages\matplotlib\", line 603, in draw
  File "C:\Python22\Lib\site-packages\matplotlib\", line 463, in draw
  File "C:\Python22\Lib\site-packages\matplotlib\", line 130, in draw
    if self.label1On: self.label1.draw(renderer)
  File "C:\Python22\Lib\site-packages\matplotlib\", line 193, in draw
    bbox, info = self._get_layout(renderer)
  File "C:\Python22\Lib\site-packages\matplotlib\", line 129, in _get_layout
    txs = [float(v[0][0]) for v in cornersRotated]
  File "C:\Python22\Lib\site-packages\Numeric\", line 154, in __float__
    def __float__(self): return self._scalarfunc(float)
  File "C:\Python22\Lib\site-packages\Numeric\", line 151, in _scalarfunc
    raise TypeError, "only rank-0 arrays can be converted to Python scalars."
TypeError: only rank-0 arrays can be converted to Python scalars. (1.14 KB)