<div dir="ltr"><span style="font-size:12.8px">Hi, </span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">[If you're also on the numpy mailing list and get a similar version of the message, I apologise for that]</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I work at Machinalis were we use a lot of scikit-learn (and the pydata stack in general). Recently we've also been getting involved with mypy, which is a tool to type check (not on runtime, think of it as a linter) annotated python code (the way of annotating python types has been recently standarized in PEP 484).</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">As part of that involvement we've started creating type annotations for the Python libraries we use most, which include both numpy and scikit-learn. Mypy provides a way to specify types with annotations in separate files in case you don't have control over a library, so we have created an initial proof of concept for numpy at [1], and we are actively improving it. You can find some additional information about it and some problems we've found on the way at this blogpost [2]. We were planning to also start some work on scikit-learn (which has a much larger surface area than numpy, so probably focusing on small parts for now); we had to start with numpy anyway given that SKL depends on it.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">What I wanted to ask is if the people involved on the SKL project are aware of PEP484 annotations and if you have some interest in starting using them. The main benefit is that annotations serve as clear (and automatically testable) documentation for users, and secondary benefits is that users discovers bugs more quickly and that some IDEs (like pycharm) are starting to use this information for smart editor features (autocompletion, online checking, refactoring tools); eventually tools like jupyter could take advantage of these annotations in the future. And the cost of writing and including these are relatively low.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">We're doing the work anyway, but contributing our typespecs back could make it easier for users to benefit from this, and for us to maintain it and keep it in sync with future releases.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If you've never heard about PEP484 or mypy (it happens a lot) I'll be happy to clarify anything about it that might helpunderstand this situation</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks!</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">D.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">[1] <a href="https://github.com/machinalis/mypy-data" target="_blank">https://github.com/machinalis/mypy-data</a> </div><div style="font-size:12.8px">[2] <a href="http://www.machinalis.com/blog/writing-type-stubs-for-numpy/" target="_blank">http://www.machinalis.com/blog/writing-type-stubs-for-numpy/</a></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Daniel F. Moisset - <span style="font-size:small">UK Country Manager</span><div><a href="http://www.machinalis.com" target="_blank">www.machinalis.com</a></div><div>Skype: @dmoisset</div></div></div></div></div>
</div>