Delete unused custom serializer

This commit is contained in:
Jason Grout 2015-03-27 15:37:38 +00:00
parent 5e83876fc7
commit a0ea58f768

View File

@ -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