Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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

Hello everyone,

I have a Python file which imports numpy and a function inside. When I run this with ironpython through Visual Studio, it works, but when I run it from C# it crashes while running this line:

dynamic test1 = ipy.UseFile("IronPythonApplication1.py");

Because it cannot import numpy, this is what I think, because I get this error for a few seconds. Then, the window closes.

It says:

"failed while initializing npycoreapi:badimageformat exception 
NumpyDotNet.NpyCoreApi.GetNativeTypeInfo<int32& intSize,............................."

This is my Python code:

import sys
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\DLLs')
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib\site-packages')

import numpy as np

def deneme():
    x = np.arange(100).reshape((10,10))
    return x
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.