{ "info": { "author": "Mingli Yuan", "author_email": "mingli.yuan@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Leibniz\n\n[![Build Status](https://api.travis-ci.com/caiyunapp/leibniz.svg?branch=master)](http://travis-ci.com/caiyunapp/leibniz) \n\nLeibniz is a python package which provide facilities to express learnable differential equations with PyTorch\n\n\nInstall\n--------\n\n```bash\npip install leibniz\n```\n\n\nHow to use\n-----------\n\nAs an example we solve an very simple advection problem, a box-shaped material transported by a constant steady wind.\n\n![moving box](https://raw.githubusercontent.com/caiyunapp/leibniz/master/advection_3d.gif)\n\n\n```python\nimport torch as th\nimport leibniz as lbnz\n\nfrom leibniz.core.gridsys.regular3 import RegularGrid\nfrom leibniz.diffeq import odeint as odeint\n\n\ndef binary(tensor):\n return th.where(tensor > lbnz.zero, lbnz.one, lbnz.zero)\n\n# setup grid system\nlbnz.bind(RegularGrid(\n basis='x,y,z',\n W=51, L=151, H=51,\n east=16.0, west=1.0,\n north=6.0, south=1.0,\n upper=6.0, lower=1.0\n))\nlbnz.use('x,y,z') # use xyz coordinate\n\n# giving a material field as a box \nfld = binary((lbnz.x - 8) * (9 - lbnz.x)) * \\\n binary((lbnz.y - 3) * (4 - lbnz.y)) * \\\n binary((lbnz.z - 3) * (4 - lbnz.z))\n\n# construct a constant steady wind\nwind = lbnz.one, lbnz.zero, lbnz.zero\n\n# transport value by wind\ndef derivitive(t, clouds):\n return - lbnz.upwind(wind, clouds)\n\n# integrate the system with rk4\npred = odeint(derivitive, fld, th.arange(0, 7, 1 / 100), method='rk4')\n```\n\nContributors\n------------\n\n* Mingli Yuan ([Mountain](https://github.com/mountain))\n* Xiang Pan ([Panpanx](https://github.com/Panpanx))\n\nAcknowledge\n-----------\n\nWe included source code with minor changes from [torchdiffeq](https://github.com/rtqichen/torchdiffeq) by Ricky Chen,\nbecause of two purpose:\n1. package torchdiffeq is not indexed by pypi\n2. package torchdiffeq is very convenient and mandatory\n\nAll our contribution is based on Ricky's Neural ODE paper (NIPS 2018) and his package.\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/caiyunapp/leibniz", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "leibniz", "package_url": "https://pypi.org/project/leibniz/", "platform": "", "project_url": "https://pypi.org/project/leibniz/", "project_urls": { "Documentation": "https://packaging.python.org/tutorials/distributing-packages/", "Homepage": "https://github.com/caiyunapp/leibniz", "Source": "https://github.com/caiyunapp/leibniz", "Tracker": "https://github.com/caiyunapp/leibniz/issues" }, "release_url": "https://pypi.org/project/leibniz/0.0.2/", "requires_dist": [ "cached-property", "torch" ], "requires_python": ">=3.6", "summary": "Leibniz is a package providing facilities to express learnable differential equations based on PyTorch", "version": "0.0.2" }, "last_serial": 5894868, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "42c4be10a3eba088b68566f5205a829a", "sha256": "4b9eaffd36a0436701edff5c5407915fd66507653374920392aa76a26252bba5" }, "downloads": -1, "filename": "leibniz-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "42c4be10a3eba088b68566f5205a829a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 40540, "upload_time": "2019-09-27T05:52:58", "url": "https://files.pythonhosted.org/packages/47/bd/5859da4d17f4bc23b335e86d590019043b971c9c52c8a8c93b3d7b87ab84/leibniz-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "822fff2db1ea0594aeab822e04574e1a", "sha256": "11d3197aa904e6dfc8089fd91d491d35bcce61b7428fa46ed43ea11a6cbfdff1" }, "downloads": -1, "filename": "leibniz-0.0.1.tar.gz", "has_sig": false, "md5_digest": "822fff2db1ea0594aeab822e04574e1a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 28451, "upload_time": "2019-09-27T05:53:01", "url": "https://files.pythonhosted.org/packages/9a/ed/4ea96131f7fea81aa704f90523bf63ebda04998b1731e67723f79e56160f/leibniz-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "45047408dc21a1e9591d2ccf83fd9504", "sha256": "0ef1ab98e5cdc40e6e1bd3888a4a2290b8e3cb78c05da060780e8d298af84c91" }, "downloads": -1, "filename": "leibniz-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "45047408dc21a1e9591d2ccf83fd9504", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 40125, "upload_time": "2019-09-27T08:32:41", "url": "https://files.pythonhosted.org/packages/32/9d/d9585135caccda80a61f09a78c4b6c4558b922825abf8c8b68f86907ae7d/leibniz-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "663640cdfb8bae3a9ea19c00982dd037", "sha256": "344bcded70b103316dcd4371de4a77c18dd0b16de2681bb1cb2a212078674736" }, "downloads": -1, "filename": "leibniz-0.0.2.tar.gz", "has_sig": false, "md5_digest": "663640cdfb8bae3a9ea19c00982dd037", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 28940, "upload_time": "2019-09-27T08:32:44", "url": "https://files.pythonhosted.org/packages/be/df/93808f49ee19f1f3b6fc678dfb80b171b1a4fe023176ac0e7f0216480fa8/leibniz-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "45047408dc21a1e9591d2ccf83fd9504", "sha256": "0ef1ab98e5cdc40e6e1bd3888a4a2290b8e3cb78c05da060780e8d298af84c91" }, "downloads": -1, "filename": "leibniz-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "45047408dc21a1e9591d2ccf83fd9504", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 40125, "upload_time": "2019-09-27T08:32:41", "url": "https://files.pythonhosted.org/packages/32/9d/d9585135caccda80a61f09a78c4b6c4558b922825abf8c8b68f86907ae7d/leibniz-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "663640cdfb8bae3a9ea19c00982dd037", "sha256": "344bcded70b103316dcd4371de4a77c18dd0b16de2681bb1cb2a212078674736" }, "downloads": -1, "filename": "leibniz-0.0.2.tar.gz", "has_sig": false, "md5_digest": "663640cdfb8bae3a9ea19c00982dd037", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 28940, "upload_time": "2019-09-27T08:32:44", "url": "https://files.pythonhosted.org/packages/be/df/93808f49ee19f1f3b6fc678dfb80b171b1a4fe023176ac0e7f0216480fa8/leibniz-0.0.2.tar.gz" } ] }