-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Milestone
Description
Consider this map operation code:
Array<Float32> arrayRetMapImage = image.par().map(Float32.class, new Map<Float32, Pixel>() {
@Override
public Float32 function(Pixel pixel) {
Float32 ret = new Float32();
ret.value = pixel.rgba.red;
return ret;
}
});
float[] floatArrayRetMapImage = arrayRetMapImage.toJavaArray();
Code generated by this operation return a 4 * (image size) float array when it shouldn't.
User function returns only a single float so the right way to do this is to analyse what type user function uses and create an array with compatible size.