def dict_of_numpyarray_to_dict_of_list(d):
for key,value in d.items():<EOL><INDENT>if isinstance(value,dict):  <EOL><INDENT>d[key] = dict_of_numpyarray_to_dict_of_list(value)<EOL><DEDENT>elif isinstance(value,numpy.ndarray): <EOL><INDENT>d[key] = value.tolist()<EOL><DEDENT><DEDENT>return d<EOL>
Convert dictionary containing numpy arrays to dictionary containing lists