ptypy.io.json_rw#

Wrapper to store nearly anything in a file using JSON encoding.

This file is part of the PTYPY package.

copyright:

Copyright 2014 by the PTYPY team, see AUTHORS.

license:

see LICENSE for details.

Functions

jread(filename, *args, **kwargs)

h5read(filename) h5read(filename, s1, s2, ...) h5read(filename, (s1,s2, ...))

json_numpy_obj_hook(dct)

Decode an encoded numpy ndarray :param dct: (dict) json encoded ndarray :return: (ndarray) if input was an encoded ndarray

jwrite(-> None)

Writes variables var1, var2, .

Classes

NumpyEncoder(*[, skipkeys, ensure_ascii, ...])

This class is adapted from http://stackoverflow.com/questions/3488934/simplejson-and-numpy-array.

Str_to_Slice()