- Äɲ䵤줿¹Ô¤Ï¤³¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
- ºï½ü¤µ¤ì¤¿¹Ô¤Ï
¤³¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
{{category ¥³¥ó¥Ô¥å¡¼¥¿}}
!!!¸½¾Ý
*C# ¤ËÁȤ߹þ¤ó¤À IronPython ¤Ç¡¢List ¤òArray(double[]) °ú¿ô¤Î´Ø¿ô¤ËÅϤ½¤¦¤È¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬È¯À¸¤¹¤ë
*IronPython ¤«¤é¡¢List ¤ò C# ¤Î Array(double[]) °ú¿ô¤Î´Ø¿ô¤ËÅϤ½¤¦¤È¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬È¯À¸¤¹¤ë
expected Array[float], got list
*C# ¦¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹
public static void Foo(double[] bar)
{
*IronPython ¤«¤é¤Î¸Æ¤Ó½Ð¤·
data = [ 1.0 , 2.0 , 3.0 ]
MyClass.Foo(data)
!!!Âнè
*Python ¦¤Ç¡¢tuple ¤ËÊÑ´¹¤·¤Æ¤ä¤ë¤È¤è¤¤¡£
data = [ 1.0 , 2.0 , 3.0 ]
MyClass.Foo(tuple(data))
!!!»²¹Í¥Ú¡¼¥¸
http://lists.ironpython.com/pipermail/users-ironpython.com/2006-June/002695.html