Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Nov 6, 2024
1 parent 56fc918 commit dd88cb4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion scico/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@
# user license can be found in the 'LICENSE' file distributed with the
# package.

"""Call tracing of scico functions and methods."""
"""Call tracing of scico functions and methods.
JIT must be disabled for tracing to function correctly (set environment
variable :code:`JAX_DISABLE_JIT=1`, or call
:code:`jax.config.update('jax_disable_jit', True)` before importing `jax`
or `scico`). Call :code:`trace_scico_calls` to initialize tracing, and
call :code:`register_variable` to associate a name with a variable so
that it can be referenced by name in the call trace.
The call trace is color-code as follows if
`colorama <https://github.com/tartley/colorama>`_ is installed:
- `module and class names`: light red
- `function and method names`: dark red
- `arguments and return values`: light blue
- `names of registered variables`: light yellow
When a method defined in a class is called for an object of a derived
class type, the class of that object is displayed in light magenta, in
square brackets.
"""


from __future__ import annotations
Expand Down

0 comments on commit dd88cb4

Please sign in to comment.