def peakfind(peak_type, xdata, ydata, **kw):
    return peak_factory(peak_type, 1, 0, 1, 0.5, 10, **kw)
p = peakfind(Psd_Peak, np.random.rand(10), np.random.rand(10), depth=111,
    ampest=222)
How do I downcast in python