You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importos.pathfromgdsCADimport*# Create some things to draw:amarks=templates.AlignmentMarks(('A', 'C'), (1,2))
text=shapes.Label('Hello\nworld!', 200, (0, 0))
box=shapes.Box((-500, -400), (1500, 400), 10, layer=2)
# Create a Cell to hold the objectscell=core.Cell('EXAMPLE')
cell.add([text, box])
cell.add(amarks, origin=(-200, 0))
cell.add(amarks, origin=(1200, 0))
# Create two copies of the Celltop=core.Cell('TOP')
cell_array=core.CellArray(cell, 1, 2, (0, 850))
top.add(cell_array)
# Add the copied cell to a Layout and savelayout=core.Layout('LIBRARY')
layout.add(top)
layout.save('output.gds')
layout.show()
And getting this error:
TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')
The text was updated successfully, but these errors were encountered:
The maintainer of this repo is not very active. Anyway, I'm pretty sure you're having the same problem as everyone else: there's a line in the source code that needs changing. Pasted from my issue submission;
to save people time scrolling and searching through the few answers on that stackoverflow post, the fix is:
open gdsCAD/core.py
change this line: colors += matplotlib.cm.gist_ncar(np.linspace(0.98, 0, 15))
to this line: colors += list(matplotlib.cm.gist_ncar(np.linspace(0.98, 0, 15)))
I'm trying to start the example script:
layout.show()
And getting this error:
TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S32') dtype('S32') dtype('S32')
The text was updated successfully, but these errors were encountered: