Message6519

Author judahgreenblatt
Recipients judahgreenblatt
Date 2011-05-02.18:12:27
SpamBayes Score 3.0200102e-09
Marked as misclassified No
Message-id <1304359947.72.0.645718933462.issue1745@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2011-05-02 18:12:27judahgreenblattsetrecipients: + judahgreenblatt
2011-05-02 18:12:27judahgreenblattsetmessageid: <1304359947.72.0.645718933462.issue1745@psf.upfronthosting.co.za>
2011-05-02 18:12:27judahgreenblattlinkissue1745 messages
2011-05-02 18:12:27judahgreenblattcreate