tags:

views:

235

answers:

1

Does a library or script exist to convert between NumPy and JPype arrays?

+1  A: 

Doesn't

JArray(float, 1)(numpyarray)

work?

At least

JArray(float, 1)(numpyarray.tolist())

should work.

tillsten
thanks. i'm working on site library to automate jpype->numpy and numpy->jpype conversions. is there something like this already ? And also , how stable is jpype from your exeprience ?
yaniv
sorry i just jpype once tested it once, so i dont have much experience in it. the one in line above is the dimension of the array, so may replace it with numpyarray.ndim().
tillsten