stanfordnlp / dspy

DSPy: The framework for programming—not prompting—foundation models
https://dspy-docs.vercel.app/
MIT License
17.53k stars 1.34k forks source link

OpenMC-mgxs-plot #1135

Closed MaryHoss closed 3 months ago

MaryHoss commented 3 months ago

hi everyone,

I have created a mgxs in OpenMC13-3 and want to Plot the fission Cross section for U235, and get this error:

fig = openmc.plot_xs('U235', ['fission'])

File "/dss/dsshome1/0C/ge25kij2/.local/lib/python3.8/site-packages/openmc/plotter.py", line 169, in plot_xs for this, types in reactions.items(): AttributeError: 'str' object has no attribute 'items'

can anyone help me sollte this error?

thank you Mary

tom-doerr commented 3 months ago

From the documentation

reactions ([dict](https://docs.python.org/3/library/stdtypes.html#dict)) – keys can be either a nuclide or element in string form or an openmc.Material object. Values are the type of cross sections to include in the plot.

You are passing a string, 'U235, which is the wrong type.

Also I don't think this is the right GitHub repo you opened the issue in.