Can scikit be used from IronPython?

扶醉桌前 提交于 2019-11-26 21:41:26

问题


I saw that numpy can be used from IronPython :

https://www.enthought.com/repo/.iron/

Is it possible to install and import scikit in IronPython? Im trying to interface between a module written in python 2.7 with scikit and an external COM object with IronPython...

Thanks


回答1:


IronPython is certainly not supported by scikit-learn, and I doubt that it'll work without significant effort. The NumPy and SciPy for IronPython document describes the porting effort required for SciPy, and this has certainly not been done for scikit-learn, which too depends heavily on Cython-generated C code (unless someone did the porting effort but didn't advertise it on the scikit-learn mailing list).




回答2:


As @larsmans said sklearn need recent numpy and scipy and embeds a bunch of compiled C extensions (wrappers for C++ libs such as libsvm / liblinear and cython generated C extensions). Hence I seriously doubt that it can ever run directly from the IronPython interpreter VM.

Your best bet is probably to try to bridge the .NET VM and a CPython interpreter running scikit-learn using something as github.com/pythonnet or even to expose on the two as an zmq, HTTP / JSON or msgpack or protobuf or avro webservice.



来源:https://stackoverflow.com/questions/16171923/can-scikit-be-used-from-ironpython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!