Module Expr Str Import alias Import alias identifier ImportFrom alias alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareEq SubscriptLoad NameLoad Index Num Str Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num TupleLoad Dict Str NameLoad AugAssignAdd NameStore Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Return ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse If Call NameLoad NameLoad NameLoad body Return Call NameLoad ListComp TupleLoad NameLoad Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body If Call AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr Str Lambda arguments args NameParam defaults Call AttributeLoad Call AttributeLoad NameLoad attr Num attr NameLoad orelse Return NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr orelse TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Dict Str Str Str Str NameLoad NameLoad Return NameLoad decorator_list
N/A N/A Tools used by the IPython notebook backends. N/A re N/A numpy np ext.six string_types iteritems util.logs _serialize_buffer _extract_buffers N/A N/A commands N/A N/A N/A Extract all data buffers from the list of GLIR commands, and replace
    them by buffer pointers {buffer: <buffer_index>}. Return the modified list
    # of GILR commands and the list of buffers as well. N/A data_commands N/A command N/A command commands N/A N/A command N/A 0 DATA N/A buffers N/A N/A data_command N/A 3 N/A data_command data_commands N/A commands_modified N/A list commands N/A buffer_index 0 N/A N/A i command N/A enumerate commands_modified N/A N/A N/A N/A command N/A 0 DATA N/A N/A N/A commands_modified N/A i N/A N/A command N/A 3 N/A N/A buffer_index buffer_index N/A buffer_index 1 N/A N/A commands_modified buffers N/A _serialize_item N/A N/A item N/A N/A N/A Internal function: serialize native types. N/A N/A isinstance item N/A list tuple N/A N/A N/A N/A _serialize_item subitem N/A subitem item N/A N/A N/A isinstance item dict N/A N/A N/A dict N/A N/A key N/A _serialize_item value N/A N/A key value N/A iteritems item N/A N/A N/A isinstance item string_types N/A N/A N/A N/A item startswith gl N/A N/A N/A N/A re sub ^gl([A-Z]) N/A N/A N/A m N/A N/A N/A N/A N/A m group 1 lower item N/A N/A item N/A N/A N/A isinstance item N/A np ndarray N/A N/A N/A _serialize_item N/A N/A N/A N/A item ravel tolist N/A N/A N/A N/A N/A N/A np asscalar item N/A N/A N/A Exception N/A N/A item N/A _serialize_command N/A N/A command_modified N/A N/A N/A Serialize a single GLIR (modified) command. The modification relates
    to the fact that buffers are replaced by pointers. N/A N/A _serialize_item command_modified N/A create_glir_message N/A N/A commands array_serialization N/A None N/A N/A Create a JSON-serializable message of GLIR commands. NumPy arrays
    are serialized according to the specified method.

    Arguments
    ---------

    commands : list
        List of GLIR commands.
    array_serialization : string or None
        Serialization method for NumPy arrays. Possible values are:
            'binary' (default) : use a binary string
            'base64' : base64 encoded string of the array

     N/A N/A array_serialization None N/A N/A array_serialization binary N/A N/A commands_modified buffers N/A _extract_buffers commands N/A commands_serialized N/A N/A _serialize_command command_modified N/A command_modified commands_modified N/A buffers_serialized N/A N/A _serialize_buffer buffer array_serialization N/A buffer buffers N/A msg N/A msg_type commands buffers glir_commands commands_serialized buffers_serialized N/A msg N/A