Support Classes and Functions

Path-Like Port Identifier Handling

Selector Validated and expanded port selector.
SelectorMethods Class for manipulating and using path-like selectors.
SelectorParser This class implements a parser for path-like selectors that can be associated with elements in a sequential data structure such as a Pandas DataFrame; in the latter case, each level of the selector corresponds to a level of a Pandas MultiIndex.

GPU Port Mappers

GPUPortMapper Maps a PyCUDA GPUArray to/from path-like port identifiers.

Python Port Mappers

BasePortMapper Maps integer sequence to/from path-like port identifiers.
PortMapper Maps a numpy array to/from path-like port identifiers.

XML Tools

graph_to_nml_module Convert a module expressed as NetworkX graphs into Neurokernel NeuroML.
graph_to_nml_pattern Convert a pattern expressed as a NetworkX graph into Neurokernel NeuroML.
load Load a Neurokernel NeuroML document.
nml_pattern_to_graph Convert a pattern expressed in Neurokernel NeuroML into a NetworkX graph.
nml_module_to_graph Convert a module expressed in Neurokernel NeuroML into NetworkX graphs.
write Write a Neurokernel NeuroML document to an XML file.

Context Managers

ExceptionOnSignal Raise a specific exception when the specified signal is detected.
IgnoreKeyboardInterrupt Ignore keyboard interrupts.
IgnoreSignal Ignore the specified signal.
OnKeyboardInterrupt Respond to keyboard interrupt with specified handler.
TryExceptionOnSignal Check for exception raised in response to specific signal.

GPU Tools

bufint Return buffer interface to GPU or numpy array.
set_by_inds Set values in a GPUArray by index.
set_by_inds_from_inds Set values in a GPUArray by index from indexed values in another GPUArray.
set_realloc Transfer data into a GPUArray instance.

MPI Tools


ZeroMQ Tools

get_random_port Return available random ZeroMQ port.
is_poll_in Check for incoming data on a socket using a poller.

Visualization Tools

imdisp Display the specified image file using matplotlib.
show_pydot Display a networkx graph using pydot.
show_pygraphviz Display a networkx graph using pygraphviz.

Logging Tools

log_exception Log the specified exception data using twiggy.
set_excepthook Set the exception hook to use the specified logger.
setup_logger Setup a twiggy logger.


LoggerMixin(name[, log_on]) Mixin that provides a per-instance logger that can be turned off.
catch_exception Catch and report exceptions when executing a function.
rand_bin_matrix Generate a rectangular binary matrix with randomly distributed nonzero entries.