You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Numpy arrays of are not being properly handled and converted into java arrays when passed to a constructor, resulting in a "No matching overloads found" error. Small example code and java class is below:
import numpy as np
arr = np.arange(0, 10, dtype=np.int32)
n2a = Numpy2Array(arr)
Traceback (most recent call last):
File "<ipython-input-11-b39ee7ec0b3b>", line 1, in <module>
n2a = Numpy2Array(arr)
File "/Users/monterial1/anaconda3/lib/python3.6/site-packages/JPype1-0.6.3-py3.6-macosx-10.7-x86_64.egg/jpype/_jclass.py", line 111, in _javaInit
*args)
RuntimeError: No matching overloads found for [init in find. at native/common/jp_method.cpp:127
And the java class is:
public class Numpy2Array
{
private int[] data = null;
public Numpy2Array(int[] data)
{
this.data = data;
}
public void PrintArray()
{
for (int i = 0; i < this.data.length; i++)
{
System.out.println(this.data[i]);
}
}
}
The text was updated successfully, but these errors were encountered:
Numpy arrays of are not being properly handled and converted into java arrays when passed to a constructor, resulting in a "No matching overloads found" error. Small example code and java class is below:
And the java class is:
The text was updated successfully, but these errors were encountered: