.Net Array or IList<T> from NumPy array in IronPython?
Posted
by Barry Wark
on Stack Overflow
See other posts from Stack Overflow
or by Barry Wark
Published on 2010-02-24T00:47:01Z
Indexed on
2010/06/02
6:53 UTC
Read the original article
Hit count: 412
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 NumPy 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.
© Stack Overflow or respective owner