hohlraum / gdsCAD

A simple but powerful Python package for creating photolithography masks in the GDSII format.
GNU General Public License v3.0
88 stars 52 forks source link

error when using .show after a GdsImport #41

Closed muab closed 8 years ago

muab commented 8 years ago

amarks = core.GdsImport(myfile) print "import correctly" amarks.show() the import apparently works, although the .show has an error. I attach traceback: import correctly Traceback (most recent call last): File "gds_tests.py", line 11, in amarks.show() File "/usr/local/lib/python2.7/dist-packages/gdsCAD-0.5.0-py2.7.egg/gdsCAD/core.py", line 91, in _show artists=self.artist() File "/usr/local/lib/python2.7/dist-packages/gdsCAD-0.5.0-py2.7.egg/gdsCAD/core.py", line 1374, in artist artists += c.artist() File "/usr/local/lib/python2.7/dist-packages/gdsCAD-0.5.0-py2.7.egg/gdsCAD/core.py", line 1692, in artist art+=e.artist() File "/usr/local/lib/python2.7/dist-packages/gdsCAD-0.5.0-py2.7.egg/gdsCAD/core.py", line 471, in artist return [matplotlib.patches.Polygon(self.points, closed=True, lw=0, **self._layer_properties(self.layer))] File "/usr/local/lib/python2.7/dist-packages/gdsCAD-0.5.0-py2.7.egg/gdsCAD/core.py", line 183, in _layer_properties colors += matplotlib.cm.gist_ncar(np.linspace(0.98, 0, 15)) TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')

muab commented 8 years ago

with the fix commented in another issue it will not complain. colors += list(matplotlib.cm.gist_ncar(np.linspace(0.98, 0, 15)))

although it consumes so many resources (CPU, Memory) that it ends up dead (killed by the OS)