Skip to content

Commit

Permalink
Allow users to use constants in formulae.
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhuramachandran committed Feb 27, 2020
1 parent 381f4e6 commit c804b6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pysph/tools/mayavi_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ def _particle_array_changed(self, old, pa):

self._eval_ns = {k: v.get_npy_array()
for k, v in pa.properties.items()}
self._eval_ns.update({k: v.get_npy_array()
for k, v in pa.constants.items()})
self._eval_ns.update(dict(np=numpy, numpy=numpy))
self._list_all_scalars_changed(self.list_all_scalars)

Expand Down

0 comments on commit c804b6e

Please sign in to comment.