af_null.py 285 字节
Newer Older
A
Alex Duan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import pickle

def init():
    pass

def destroy():
    pass

def start():
    return pickle.dumps([])

def finish(buf):
    return None

def reduce(datablock, buf):
    (rows, cols) = datablock.shape()
    mins = pickle.loads(buf)
    mins.append(None)
    return pickle.dumps(mins)