.Net Array or IList<T> from NumPy array in IronPython?
Imagine I have a .Net application that supports user extensions in the form of Python modules by embedding IronPython. Using Ironclad, I can allow users to make use of the N开发者_如何学编程umPy and SciPy packages from within their modules. How good is the interop provided by Ironclad? My question is: can I use a NumPy array of type T
provided by the user's module in the rest of my app that requires an IList<T>
?
Edit To clarify, IronPython exposes any Python enumerable of objects of type T
as an IEnumerable<T>
or an IList<T>
. I'm not sure if NumPy arrays fit in this category. I would rather not have to call .tolist()
on the NumPy array as the arrays may be quite large.
No you can't. Perhaps I might be doing it the stupid way , but i convert my numpy array into a list and then into a List[T].
精彩评论