<div dir="ltr"><div dir="ltr"><div>That's a cool trick but I am worried it would render our API too "frameworky" for my taste.</div><div><br></div><div>I think the FunctionTransformer is enough:</div><div><br></div><div><a href="http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.FunctionTransformer.html">http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.FunctionTransformer.html</a><br></div></div></div>