[IronPython] Error with non-jagged array?

Michael MichaelNedzelsky at yandex.ru
Sat Apr 9 20:13:27 CEST 2005


>On Saturday 09 April 2005 14:09, Keith J. Farmer wrote:
> Caveat:  I ran this using Mono, so I'm not sure if it's really a problem
> with Mono, or a bug in IronPython.  It looks like there are some
> problems with arrays, but someone with a Win32 version should check
> this.

Using Windows XP SP2 with .NET 2.0 beta 1.

c:\User\Michael\Current\test\IronPython-0.7.1\bin>IRonPythonConsole
IronPython 0.7.1 on .NET 2.0.40607.16
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import sys
>>> sys.LoadAssemblyFromFile("Mapack.dll")
>>> from Mapack import *
>>> m = Matrix.Random(3, 3)
>>> m
0.317911618537228 0.60680240281243 0.260385566512302
0.12768023839578 0.684026812987415 0.0971812834484416
0.560014263056225 0.824561594438069 0.449464813549754

>>> m.Transpose()
0.317911618537228 0.12768023839578 0.560014263056225
0.60680240281243 0.684026812987415 0.824561594438069
0.260385566512302 0.0971812834484416 0.449464813549754

>>> m[0, 0]
System.Reflection.TargetParameterCountException: Parameter count mismatch.
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags 
in
vokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] 
index)

   at IronPython.Objects.PythonType.__getitem__(Object self, Object index)
   at IronPython.Objects.Ops.GetIndex(Object o, Object index)
   at input_6.Run(Frame frame)
   at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
   at IronPython.Hosting.PythonEngine.RunInteractive()

Michael




More information about the Ironpython-users mailing list