Numpy 64-bit support in PTVS and numpy System.Int64 casting

I am trying to write code with IronPython and numpy that calls a .NET assembly. Version Information: NumPy-2.0.0-1 SciPy-1.0.0-2 IronPython 2.7.1

I installed scipy and numpy according to the instructions given here:

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

When I try to start with ipy64.exe, I get the following:

Failed while initializing NpyCoreApi: BadImageFormatException:An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000
B)
NumpyDotNet stack trace:
  at NumpyDotNet.NpyCoreApi.GetNativeTypeInfo(Int32& intSize, Int32& longsize, Int32& longLongSize, Int32& longDoubleSize)
  at NumpyDotNet.NpyCoreApi..cctor()

Everything works with ipy.exe. Is the current numpy version for IronPython not compatible with the 64-bit version?

The root problem I'm studying (may or may not be related to the above) involves calling the .NET assembly method, which requires System.Int64 as an argument. The python native int property works fine, but when called with numpy.int32 (under ipy.exe), implicit copying completes with:

E
======================================================================
ERROR: data_type_tests
   System.Array[Int64](listValues)
TypeError: expected Int64, got numpy.int32

The code I execute is:

values = array([1,2,3,4,5])
listValues = list(values);
System.Array[Int64](listValues)

, = [1,2,3,4,5] .

numpy System.Array [Int64] 32 64- IronPython?

+2
1

:

listValues.tolist() instead of list(listValues)

list() . , : http://www.python-forum.org/pythonforum/viewtopic.php?f=3&t=2962&p=12102

64- numpy?

0

All Articles