在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):awesomebytes/libermate开源软件地址(OpenSource Url):https://github.com/awesomebytes/libermate开源编程语言(OpenSource Language):Python 88.6%开源软件介绍(OpenSource Introduction):DEPRECATEDUse https://github.com/victorlei/smop instead. libermateLiberMate - A MATLAB to Python (SciPy/NumPy) Translator All credit goes to Eric C. Schug for this incredible work. Check notes_on_using_libermate.txt if you use it and it doesn't work properly (it's normal!) I give many hints there on how to correct problems I had while translating https://github.com/awesomebytes/parametric_modeling You may want to try the new: https://github.com/victorlei/smop It's a work in progress, which means, someone is working on it! This one is just as it is. ========= (Almost) Original README from http://sourceforge.net/p/libermate/code/HEAD/tree/ === LiberMate === LiberMate - A MATLAB to Python (SciPy/NumPy) Translator
===Setup=== Libermate needs pyclips http://pyclips.sourceforge.net/web/ --> http://sourceforge.net/projects/pyclips/files/pyclips/pyclips-1.0/ Download pyclips-1.0.7.348.tar.gz Extract and install (there is a README if you have doubts)
===Run=== Change directory to the libermate directorie e.g. $ cd libermate To get command line help use $ python libermate.py -h To convert a single test file type $ python libermate.py Tests/colon.m and will print the following output
To convert all test files type $ python libermate.py Tests/*.m To output Abstract Syntax Tree from colon.m $ python libermate.py --astdump Tests/colon.m
This will create a file called Tests/colon.ast which contains the AST for the parsed file. The AST file can be useful to track where the Parser may have had problems. LiberMate will attempt to convert MATLAB source files to python. The MATLAB files must end with .m and the translated python code will be written to python files, of the same name but ending with .py. ===Known Issues===
$ ./libermate.py Tests/matrix_tests.m
The output shows two errors on lines 10 and 11 that are cause by an initial newline and final newline in matrix expression for variable d.
TODO
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论