(obj, save_path)
Dumps a python data structure to a saved on-disk representation.  We
    currently support writing to the following file formats (expected filename
    extension in brackets):

        * python pickle (.pkl)

    Arguments:
        obj (object): the python object to be saved.
        save_path (str): Where to write the serialized object (full path and
                         file name)

    See Also:
        :py:func:`~neon.models.model.Model.serialize`
Dumps a python data structure to a saved on-disk representation.  We
    currently support writing to the following file formats (expected filename
    extension in brackets):
Dumps a python data structure to a saved on - disk representation . We currently support writing to the following file formats ( expected filename extension in brackets ) :
def save_obj(obj, save_path):
    """
    Dumps a python data structure to a saved on-disk representation.  We
    currently support writing to the following file formats (expected filename
    extension in brackets):

        * python pickle (.pkl)

    Arguments:
        obj (object): the python object to be saved.
        save_path (str): Where to write the serialized object (full path and
                         file name)

    See Also:
        :py:func:`~neon.models.model.Model.serialize`
    """
    if save_path is None or len(save_path) == 0:
        return
    save_path = os.path.expandvars(os.path.expanduser(save_path))
    logger.debug("serializing object to: %s", save_path)
    ensure_dirs_exist(save_path)

    pickle.dump(obj, open(save_path, 'wb'), 2)
def save_obj ( obj , save_path ) : if save_path is None or len ( save_path ) == 0 : return save_path = os . path . expandvars ( os . path . expanduser ( save_path ) ) logger . debug ( "serializing object to: %s" , save_path ) ensure_dirs_exist ( save_path ) pickle . dump ( obj , open ( save_path , 'wb' ) , 2 )