私はEclipseSWT/JFaceを使用してjythonアプリケーションを作成しています。いくつかの値を取得するには、float配列をJavaオブジェクトに渡す必要があります。私はそれにjarrayパッケージを使用しています。それを行うためのより多くのpythonicな方法はありますか?
bounds = zeros(4, 'f')
# from java org.eclipse.swt.graphics.Path.getBounds(float[] bounds)
path.getBounds(bounds)
# from java org.eclipse.swt.graphics.Rectangle(int x, int y, int width,int height)
rect = Rectangle(int(round(bounds[0])),
int(round(bounds[1])),
int(round(bounds[2])),
int(round(bounds[3])))