def save_npz(filename, obj, compression=True):
    s = DictionarySerializer()
    s.save(obj)
    with open(filename, 'wb') as f:
        if compression:
            numpy.savez_compressed(f, **s.target)
        else:
            numpy.savez(f, **s.target)
Saves an object to the file in NPZ format.
dataset/ETHPy150Open pfnet/chainer/chainer/serializers/npz.py/save_npz