Skip to content

Commit 0d61534

Browse files
authored
add a get_grid() method to the Pyro class (#219)
this makes things easier when working in Jupyter
1 parent 32b3653 commit 0d61534

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pyro/pyro_sim.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,16 @@ def get_var(self, v):
247247

248248
return self.sim.cc_data.get_var(v)
249249

250+
def get_grid(self):
251+
"""
252+
Return the underlying grid object for the simulation
253+
"""
254+
255+
if not self.is_initialized:
256+
msg.fail("ERROR: problem has not been initialized")
257+
258+
return self.sim.cc_data.grid
259+
250260

251261
class PyroBenchmark(Pyro):
252262
"""

0 commit comments

Comments
 (0)