This reference addresses the jpy Python module.
You will never have to use the following type directly. But it may be of use to know where they come from when they are referred to, e.g. in error messages.
This section describes the type possible type conversions made by jpy when Python values are passed as arguments to Java typed parameters. In the tables given below are the generated match values ranging from (types never match) to 100 (full match) when comparing a given Java parameter type (rows) with a provided Python value (columns). These match values are also used for finding the best matching Java method overload for a given Python argument tuple.
NoneType |
bool |
int |
float |
number | |
---|---|---|---|---|---|
boolean |
|
|
|
|
|
char |
|
|
|
|
|
byte |
|
|
|
|
|
short |
|
|
|
|
|
int |
|
|
|
|
|
long |
|
|
|
|
|
float |
|
|
|
|
|
double |
|
|
|
|
|
NoneType |
bool |
int |
float |
str |
|
---|---|---|---|---|---|
java.lang.Boolean |
|
|
|
|
|
java.lang.Character |
|
|
|
|
|
java.lang.Byte |
|
|
|
|
|
java.lang.Short |
|
|
|
|
|
java.lang.Integer |
|
|
|
|
|
java.lang.Long |
|
|
|
|
|
java.lang.Float |
|
|
|
|
|
java.lang.Double |
|
|
|
|
|
java.lang.String |
|
|
|
|
|
java.lang.Object |
|
|
|
|
|
NoneType |
seq | buf('b') | buf('B') | buf('u') | buf('h') | buf('H') | buf('i') | buf('I') | buf('l') | buf('L') | buf('q') | buf('Q') | buf('f') | buf('d') | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
boolean[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
byte[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
short[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If a python buffer is passed as argument to a primitive array parameter, but it doesn't match the buffer types given above, the a match value of 10 applies, as long as the item size of a buffer matches the Java array item size.
todo
jpy's Java API documentation has been generated from Java source code using the javadoc tool. It can be found here.