Issue1745
Created on 2011-05-02.18:12:27 by judahgreenblatt, last changed 2016-01-13.22:56:58 by zyasoft.
msg6519 (view) |
Author: Judah Greenblatt (judahgreenblatt) |
Date: 2011-05-02.18:12:27 |
|
Error happens when calling PythonInterpreter from Java.
Example Java code:
interp = new PythonInterpreter();
interp.put("arr", new double[3]);
interp.exec("arr.append(3.0)\n\n");
o = interp.get(arr, Object.class);
o ends up as double[7] with 3.0 in position 3.
Should be double[4].
Error is in PyArray.__toJava__(Class)
where it returns 'data' instead of calling this.getArray() which calls delegate.copyArray().
|
msg10597 (view) |
Author: Jim Baker (zyasoft) |
Date: 2016-01-06.22:24:11 |
|
I added a test (https://hg.python.org/jython/rev/837c14575b65) based on what Judah submitted here:
public void testCompactArray() {
// tests http://bugs.jython.org/issue1745
PythonInterpreter interp = new PythonInterpreter();
interp.put("arr", new double[3]);
interp.exec("arr.append(3.0)\n\n");
o = interp.get(arr, Object.class);
}
and determined this problem must have been fixed a while ago - it was not changed by the recent work in https://hg.python.org/jython/rev/49d498968f34
|
|
Date |
User |
Action |
Args |
2016-01-13 22:56:58 | zyasoft | set | status: pending -> closed |
2016-01-06 22:24:12 | zyasoft | set | status: open -> pending resolution: out of date messages:
+ msg10597 nosy:
+ zyasoft |
2013-02-25 18:32:37 | fwierzbicki | set | priority: normal nosy:
+ fwierzbicki versions:
+ Jython 2.5, - 2.5.1 |
2011-05-02 18:12:27 | judahgreenblatt | create | |
|