modelx.setup_ipython#

setup_ipython()[source]#

Configure IPython shell for modelx error handling.

Customizes IPython’s exception display to provide modelx-specific traceback information when formula errors occur. This enhances the debugging experience by showing formula call stacks and context.

When enabled:

  • Formula errors show modelx-specific traceback

  • Cell call chains are displayed clearly

  • Local variables in formulas can be inspected

This function is automatically called when using modelx in IPython, Jupyter notebooks, or Spyder with spyder-modelx plugin.

Example

>>> import modelx as mx
>>> mx.setup_ipython()
# Now formula errors show modelx-enhanced tracebacks

See also