{ "info": { "author": "Joakim M\u00f6ller", "author_email": "joakim.moller@molflow.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "=====================================\r\nPython interface to MATLAB (pymatlab)\r\n=====================================\r\n\r\nThis package lets Python users interface and communicate with MATLAB from\r\nPython. Pymatlab makes it easier for users to integrate a project with a large\r\nMATLAB codebase into python scripts by using MATLAB scripts as a part of the\r\npython program.\r\n\r\nThe basic functionality of this package is to send data from Python to MATLAB's\r\nworkspace to be able to run Matlab function on the data. After processing you\r\nretrieve back data to python. This enables you to process data with Mathlab's\r\nbuilt in functions, toolboxes or Matlab-scripts. It is also possible to use\r\nMATLAB's to generate plots or other graphics.\r\n\r\nThe package uses Numpy's ndarrays and translates them into MATLAB's mxarrays\r\nusing Python's ctypes and Matlab's mx library. The interface to MATLAB's\r\nworkspace in done through MATLAB's engine library.\r\n\r\n\r\nDownload\r\n--------\r\n\r\nDownloading is possible from PyPi_ and `SourceForge pymatlab files`__. Since\r\npymatlab is hosted at SourceForge_ the latest development version is available\r\nfrom git. There are different branches available this is the ctypes variant.\r\n\r\n.. _PyPi: http://pypi.python.org \r\n.. _Files: http://sourceforge.net/projects/pymatlab/files/\r\n.. _SourceForge: http://sourceforge.net\r\n\r\n__ Files_\r\n\r\nInstalling\r\n----------\r\n\r\nStandard installation method using pip, easy_install or 'python setup.py\r\ninstall'.\r\n\r\nPreparing to use pymatlab\r\n-------------------------\r\n\r\nYou need MATLAB_ from Mathworks properly installed on your local machine.\r\n\r\n.. _MATLAB: http://www.mathworks.se/products/matlab/ \r\n\r\nLinux:\r\n\r\nC-shell has to be installed in order to make the Matlab connection work. Also\r\nthe path to the matlab binary needs to be set.\r\n\r\n $ sudo apt-get install csh\r\n\r\n $ export PATH = /opt/MATLAB/R2013a/bin:$PATH\r\n\r\nWin:\r\n\r\nOn Windows make sure the Matlab DLLs are in your \"Path\" environment variable.\r\nThis version is not tested in Windows but should be possible to run with some\r\ndebugging efforts.\r\n\r\nRequirements\r\n------------\r\n\r\n- Python\r\n\r\n Version 2.\r\n \r\n- Matlab \r\n \r\n Versions 2009a,2010a,2013a tested. Presumably any version?\r\n\r\n- Numpy\r\n\r\n Any version? tested on version 1.3.0. \r\n\r\nLimitations\r\n-----------\r\n\r\nThe current version lets you transfer arrays of any rank between Python and\r\nMatlab using the following datatypes: Single and double precision floatpoint\r\nnumbers. Integer numbers of different bit lengths (8-64) unsigned or signed.\r\nComplex numbers (single or double precision). Logical arrays. Any other types\r\nwill probably fail or give unpredictable results.\r\n\r\nUsing pymatlab\r\n--------------\r\n\r\nFirst import:\r\n\r\n>>> import pymatlab\r\n \r\nInitialise the interpretor.\r\n\r\n>>> session = pymatlab.session_factory()\r\n\r\nCreate an numpy-array to start the work.\r\n\r\n>>> from numpy.random import randn\r\n>>> a = randn(20,10,30)\r\n\r\nSend the numpy array a to the MATLAB Workspace to the variable 'A'\r\n \r\n>>> session.putvalue('A',a)\r\n\r\nDo something in matlab in MATLAB with variable A. Sucessfull commands return\r\nan empty string - if MATLAB generates an error the returning string holds the\r\nerror message\r\n \r\n>>> session.run('B=2*A')\r\n\r\n>>> session.run('C')\r\nTraceback (most recent call last):\r\n ...\r\nRuntimeError: Error from Matlab: Error: MATLAB:UndefinedFunction with message: Undefined function or variable 'C'.\r\n\r\n\r\nA trick to make larger scripts more failsafe with regards to syntax errors.\r\nSend a script to a string variable and run it with eval().\r\n\r\n>>> mscript = \"\"\"D = A\r\n... for i=1:10\r\n... D = 2*D\r\n... end\r\n... \"\"\"\r\n>>> session.putvalue('MSCRIPT',mscript)\r\n>>> session.run('eval(MSCRIPT)')\r\n\r\nTo retrive the variable back to python:\r\n\r\n>>> b = session.getvalue('B')\r\n>>> (2*a==b).all()\r\nTrue\r\n\r\n\r\nIf you want to explicitly close the connection to the interpreter delete the\r\ninstance. Normally Matlab will be close when the session variable runs out of\r\nscope.\r\n\r\n>>> del session\r\n\r\nBugs, support and feature requests\r\n----------------------------------\r\n\r\nAll bug reports, feature requests or support questions are directed\r\nto to pymatlab@molflow.com.\r\n\r\nPlease consider to support us in our efforts by `donating to pymatlab`__. Your\r\ndonations will be used to buy hardware and software licenses to be able to\r\ncontinue to develop this package. \r\n\r\n.. _Donations: http://sourceforge.net/donate/index.php?group_id=307148\r\n\r\n__ Donations_\r\n\r\n=======\r\nHISTORY\r\n=======\r\n\r\n2013-10-24 pymatlab 0.2.3\r\n-------------------------\r\n\r\nBugfix. Confirming the GPLv3 licence.\r\n\r\n2013-10-21 pymatlab 0.2.2\r\n-------------------------\r\n\r\nNow integers of bitlength 8-64 signed or unsigned, single and double precision\r\nfloats, complex numbers (single,double) and logical arrays are supported.\r\n\r\n2013-10-15 pymatlab 0.2.1\r\n-------------------------\r\n\r\nAdded support for int16, int32, int64, float32 and float64 matrices of any\r\nrank. Squeezing of matrices is done automatically. Added a convenience 'session\r\nfactory' to create a session and start matlab.\r\n\r\n2011-11-01 pymatlab 0.2.0\r\n-------------------------\r\n\r\nA ctypes implementation. This makes it easier to run and install because of no\r\nneed for compilation.\r\n\r\n2010-04-18 pymatlab 0.1.3\r\n--------------------------\r\n\r\nRun now throws exception RuntimeError on erros. A critical bug was fixed\r\nconcernings numpys C memory alignment and MATLAB's Fortran memory alignment in\r\nmatrices.\r\n\r\n2010-04-09 pymatlab 0.1.2\r\n-------------------------\r\n\r\nBugfixes for 32-bit machines. Closed some memory leaks.\r\n\r\n2010-02-26 pymatlab 0.1.1\r\n-------------------------\r\n\r\nAdded the missing MANIFEST.in file to include the docs/ directory. And some\r\nsmall changes in the README.txt to work with restructured text.\r\n\r\n2010-02-25 pymatlab 0.1.0\r\n-------------------------\r\n\r\nThis first version om pymatlab including lots of potential memory leaks. The\r\nfollowing features ships with this version:\r\n\r\n* running commands in the Matlab command interpretor. \r\n\r\n* Placing double precision matrices with arbitrary dimensions on\r\n the MATLAB workspace from numpy arrays.\r\n\r\n* Retrive double precision matrices from MATLAB workspace to numpy arrays.\r\n\r\n* Place string variables on MATLAB workspace.", "description_content_type": null, "docs_url": null, "download_url": "https://sourceforge.net/projects/pymatlab/files/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://molflow.com/pymatlab.html", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "pymatlab", "package_url": "https://pypi.org/project/pymatlab/", "platform": "Linux,Windows", "project_url": "https://pypi.org/project/pymatlab/", "project_urls": { "Download": "https://sourceforge.net/projects/pymatlab/files/", "Homepage": "http://molflow.com/pymatlab.html" }, "release_url": "https://pypi.org/project/pymatlab/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "A pythonic interface to MATLAB", "version": "0.2.3" }, "last_serial": 903971, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "bc9161bbc0ab38e1f16f9d8bd0b3965a", "sha256": "3e106d1a6a48cdd699ba258e37048af16ee2acfcd7af332da976512bab9b19cc" }, "downloads": -1, "filename": "pymatlab-0.1.3-py2.5-linux-i686.egg", "has_sig": false, "md5_digest": "bc9161bbc0ab38e1f16f9d8bd0b3965a", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 21664, "upload_time": "2010-04-19T13:46:56", "url": "https://files.pythonhosted.org/packages/c8/48/26e98c4b75f0091d1b3409676a0b1ff65318da076418a35189144b0c0128/pymatlab-0.1.3-py2.5-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "6c026c1fd5373c5d8b1c706d7de9c126", "sha256": "7d658fa6b1f538013539786f4e56174bcf3127c454092e35ddcde6e74f389daa" }, "downloads": -1, "filename": "pymatlab-0.1.3-py2.5-linux-x86_64.egg", "has_sig": false, "md5_digest": "6c026c1fd5373c5d8b1c706d7de9c126", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 22823, "upload_time": "2010-04-19T13:55:30", "url": "https://files.pythonhosted.org/packages/3c/08/fe55d43c94e1c73ea19d7e7312ea51a9221b1166e2a1495d3687232d37a3/pymatlab-0.1.3-py2.5-linux-x86_64.egg" }, { "comment_text": "", "digests": { "md5": "f81624c163b1a0c156823e8d86a6a299", "sha256": "98df85982a1798c8a1e0d50be4856b15b7da589c5593cf1441f47c9422c94359" }, "downloads": -1, "filename": "pymatlab-0.1.3-py2.6-linux-i686.egg", "has_sig": false, "md5_digest": "f81624c163b1a0c156823e8d86a6a299", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 21927, "upload_time": "2010-04-19T13:53:36", "url": "https://files.pythonhosted.org/packages/17/d3/722d86343dbfe1f325f7e98b7b1dc68853d11c476b68e681be7f104ac70e/pymatlab-0.1.3-py2.6-linux-i686.egg" }, { "comment_text": "", "digests": { "md5": "e68e42d0e8dc16c3c04244356695542f", "sha256": "76f07e2a51d41a6c956c41ce1951f75a61e8093c10c6b4733bb6262837ceffb2" }, "downloads": -1, "filename": "pymatlab-0.1.3-py2.6-linux-x86_64.egg", "has_sig": false, "md5_digest": "e68e42d0e8dc16c3c04244356695542f", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 23086, "upload_time": "2010-04-19T00:01:21", "url": "https://files.pythonhosted.org/packages/a5/cf/85bf3b5049e218e7c1d35d88464e75c28aa055699afb578d4e2001b67454/pymatlab-0.1.3-py2.6-linux-x86_64.egg" }, { "comment_text": "", "digests": { "md5": "ce72fdacae55f55ed4253dffbc244e48", "sha256": "e065a917d3dec330d72ccb2a3818a763bebbd741274023c0ecba396cdb4574fc" }, "downloads": -1, "filename": "pymatlab-0.1.3-py2.6-win32.egg", "has_sig": false, "md5_digest": "ce72fdacae55f55ed4253dffbc244e48", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 13394, "upload_time": "2010-04-19T00:02:14", "url": "https://files.pythonhosted.org/packages/a5/5b/158d3e39c0258873aabcdb3f3276fbffd203fc1e8500a02ee4f24572356d/pymatlab-0.1.3-py2.6-win32.egg" }, { "comment_text": "", "digests": { "md5": "91c1c33066074c47659c2af8833e8724", "sha256": "1f95b6a12b0cf9e60be286db67371a6493d71cfe1d0084a9d791143cc13fc36d" }, "downloads": -1, "filename": "pymatlab-0.1.3.tar.gz", "has_sig": false, "md5_digest": "91c1c33066074c47659c2af8833e8724", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22359, "upload_time": "2010-04-19T00:01:20", "url": "https://files.pythonhosted.org/packages/a9/25/1d59551f7c1d5dc8087cc373ac34d0daedb7297db6cb4ac5dbba1582fd39/pymatlab-0.1.3.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "c99932a458d20f218690153bd1aa4909", "sha256": "ad9528c1c1ba3974a98992d9b985f5ba3103568334d7442a8222b3fb089a2a7d" }, "downloads": -1, "filename": "pymatlab-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "c99932a458d20f218690153bd1aa4909", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 20941, "upload_time": "2013-10-24T13:20:36", "url": "https://files.pythonhosted.org/packages/02/3a/f5e82ef79a565bfb2c05ab1f4404b38dc3150d18fbf2bc0152ac0eb87fae/pymatlab-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d7360a429890686301eb7c2f518279aa", "sha256": "c7b3e8adc546f5f829502e8615635213a2256dd66c69d2cde69081eb5e85613a" }, "downloads": -1, "filename": "pymatlab-0.2.3.tar.gz", "has_sig": false, "md5_digest": "d7360a429890686301eb7c2f518279aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21919, "upload_time": "2013-10-24T13:20:32", "url": "https://files.pythonhosted.org/packages/e8/ec/369f51e5d6c4a963d0cadaa2ff77ede406ae894f2e9d68ef99c62f679966/pymatlab-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c99932a458d20f218690153bd1aa4909", "sha256": "ad9528c1c1ba3974a98992d9b985f5ba3103568334d7442a8222b3fb089a2a7d" }, "downloads": -1, "filename": "pymatlab-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "c99932a458d20f218690153bd1aa4909", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 20941, "upload_time": "2013-10-24T13:20:36", "url": "https://files.pythonhosted.org/packages/02/3a/f5e82ef79a565bfb2c05ab1f4404b38dc3150d18fbf2bc0152ac0eb87fae/pymatlab-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d7360a429890686301eb7c2f518279aa", "sha256": "c7b3e8adc546f5f829502e8615635213a2256dd66c69d2cde69081eb5e85613a" }, "downloads": -1, "filename": "pymatlab-0.2.3.tar.gz", "has_sig": false, "md5_digest": "d7360a429890686301eb7c2f518279aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21919, "upload_time": "2013-10-24T13:20:32", "url": "https://files.pythonhosted.org/packages/e8/ec/369f51e5d6c4a963d0cadaa2ff77ede406ae894f2e9d68ef99c62f679966/pymatlab-0.2.3.tar.gz" } ] }