From a0ea58f7680677c250955e79959379f9e2fcc987 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 27 Mar 2015 15:37:38 +0000 Subject: [PATCH] Delete unused custom serializer --- IPython/html/widgets/widget.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index c4aaff74d..03148f6fa 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -111,25 +111,9 @@ def _json_to_widget(x): widget_serialization = { 'from_json': _json_to_widget, - 'to_json': lambda x: (_widget_to_json(x), {'serialization': ('widget_serialization', 'widgets/js/types')}) + 'to_json': lambda x: (_widget_to_json(x), {'serialization': ('models', 'widgets/js/types')}) } -def _to_binary_list(x): - import numpy - return memoryview(numpy.array(x, dtype=float)), {'serialization': ('list_of_numbers', 'widgets/js/types')} - -def _from_binary_list(x): - import numpy - a = numpy.frombuffer(x.tobytes(), dtype=float) - return list(a) - -list_of_numbers = { - 'from_json': _from_binary_list, - 'to_json': _to_binary_list -} - - - class Widget(LoggingConfigurable): #------------------------------------------------------------------------- # Class attributes