From: Yaqiang W. <yaq...@gm...> - 2019-03-10 16:36:21
|
I just start NumJy project (https://github.com/Yaqiang/numjy) which is numpy similar package for Jython. It is developed with Java + Jython. The multiple array implemented based on the ucar.ma2 code. Apache commons math and ejml libraries were used for scientific computation. The project was peeled from MeteoInfo project so it can be used easily by other projects. DataFrame, 2D/3D plot and other packages will be released in the future which has been implemented in MeteoInfo project. Build the project and copy numjy folder into Lib->site-packages folder of Jython, then you can use NumJy as following. D:\MyProgram\java\MeteoThinkDev\NumJy>jython Jython 2.7.1 (default:0df7adb1b397, Jun 30 2017, 19:02:43) [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java11.0.1 Type "help", "copyright", "credits" or "license" for more information. >>> import numjy as np >>> a = np.arange(10) >>> a array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) >>> a = a.reshape(2, 5) >>> a array([[0, 1, 2, 3, 4] [5, 6, 7, 8, 9]]) >>> a * 10 array([[0, 10, 20, 30, 40] [50, 60, 70, 80, 90]]) >>> It is welcome to use and test NumJy. Regards Yaqiang -- ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China yaq...@gm... www.meteothink.org ************************************************** |