{ "info": { "author": "Bj\u00f6rn Dahlgren", "author_email": "bjodah@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "finitediff\n==========\n.. image:: http://hera.physchem.kth.se:9090/api/badges/bjodah/finitediff/status.svg\n :target: http://hera.physchem.kth.se:9090/bjodah/finitediff\n :alt: Build status\n.. image:: https://img.shields.io/pypi/v/finitediff.svg\n :target: https://pypi.python.org/pypi/finitediff\n :alt: PyPI version\n.. image:: https://zenodo.org/badge/14988640.svg\n :target: https://zenodo.org/badge/latestdoi/14988640\n :alt: Zenodo DOI\n.. image:: https://img.shields.io/badge/python-2.7,3.4,3.5-blue.svg\n :target: https://www.python.org/\n :alt: Python version\n.. image:: https://img.shields.io/pypi/l/finitediff.svg\n :target: https://github.com/bjodah/finitediff/blob/master/LICENSE\n :alt: License\n.. image:: http://hera.physchem.kth.se/~finitediff/branches/master/htmlcov/coverage.svg\n :target: http://hera.physchem.kth.se/~finitediff/branches/master/htmlcov\n :alt: coverage\n\n``finitediff`` containts three implementations of Begnt Fornberg's\nformulae for generation of finite difference weights on aribtrarily\nspaced one dimensional grids:\n\n- `C89 `_\n- `Fortran 90 `_\n- `C++ `_\n\nThe finite difference weights can be\nused for optimized inter-/extrapolation data series for up to\narbitrary derivative order. Python_ bindings (to the C versions) are also provided.\n\n.. _Python: https://www.python.org\n.. _finitediff: https://github.com/bjodah/finitediff\n\n\nCapabilities\n------------\n``finitediff`` currently provides callbacks for estimation of derivatives\nor interpolation either at a single point or over an array (available\nfrom the Python bindings).\n\nThe user may also manually generate the corresponding weights. (see\n``calculate_weights``)\n\nFinitediff can be conditionally compiled to make ``finitediff_interpolate_by_finite_diff``\nmultithreaded. Then the number of threads used is set through the environment variable\n``FINITEDIFF_NUM_THREADS`` (or ``OMP_NUM_THREADS``).\n\n\nDocumentation\n-------------\nAutogenerated API documentation for latest stable release is found here:\n``_\n(and the development version for the current master branch is found here:\n``_).\n\nExamples\n--------\nGenerating finite difference weights is simple using C++11:\n\n.. code:: C++\n\n #include \"finitediff_templated.hpp\"\n #include \n #include \n #include \n\n int main(){\n const unsigned max_deriv = 2;\n std::vector labels {\"0th derivative\", \"1st derivative\", \"2nd derivative\"};\n std::vector x {0, 1, -1, 2, -2}; // Fourth order of accuracy\n auto coeffs = finitediff::generate_weights(x, max_deriv);\n for (unsigned deriv_i = 0; deriv_i <= max_deriv; deriv_i++){\n std::cout << labels[deriv_i] << \": \";\n for (unsigned idx = 0; idx < x.size(); idx++){\n std::cout << coeffs[deriv_i*x.size() + idx] << \" \";\n }\n std::cout << std::endl;\n }\n }\n\n\n::\n\n $ cd examples/\n $ g++ -std=c++11 demo.cpp -I../include\n $ ./a.out\n Zeroth derivative (interpolation): 1 -0 0 0 -0\n First derivative: -0 0.666667 -0.666667 -0.0833333 0.0833333\n Second derivative: -2.5 1.33333 1.33333 -0.0833333 -0.0833333\n\n\nand of course using the python bindings:\n\n.. code:: python\n\n >>> from finitediff import get_weights\n >>> import numpy as np\n >>> c = get_weights(np.array([0, -1., 1]), 0, maxorder=1)\n >>> np.allclose(c[:, 1], [0, -.5, .5])\n True\n\n\nfrom Python you can also use the finite differences to interpolate\nvalues (or derivatives thereof):\n\n.. code:: python\n\n >>> from finitediff import interpolate_by_finite_diff as ifd\n >>> x = np.array([0, 1, 2])\n >>> y = np.array([[2, 3, 5], [3, 4, 7], [7, 8, 9], [3, 4, 6]])\n >>> xout = np.linspace(0.5, 1.5, 5)\n >>> r = ifd(x, y, xout, maxorder=2)\n >>> r.shape\n (5, 4, 3)\n\n\nsee the ``examples/`` directory for more examples.\n\nInstallation\n------------\nSimplest way to install is to use the `conda package manager `_:\n\n::\n\n $ conda install -c conda-forge finitediff pytest\n $ python -m pytest --pyargs finitediff\n\ntests should pass.\n\nManual installation\n~~~~~~~~~~~~~~~~~~~\nYou can install ``finitediff`` by using ``pip``::\n\n $ python -m pip install --user finitediff\n\n(you can skip the ``--user`` flag if you have got root permissions),\nto run the tests you need ``pytest`` too::\n\n $ python -m pip install --user --upgrade pytest\n $ python -m pytest --pyargs finitediff\n\n\nDependencies\n------------\nYou need either a C, C++ or a Fortran 90 compiler. On debian based linux systems you may install (all) by issuing::\n\n $ sudo apt-get install gfortran g++ gcc\n\nSee `setup.py `_ for optional (Python) dependencies.\n\n\nCiting\n------\nThe algortihm is a rewrite of:\n\nhttp://dx.doi.org/10.1137/S0036144596322507\n\n::\n\n @article{fornberg_classroom_1998,\n title={Classroom note: Calculation of weights in finite difference formulas},\n author={Fornberg, Bengt},\n journal={SIAM review},\n volume={40},\n number={3},\n pages={685--691},\n year={1998},\n publisher={SIAM}\n doi={10.1137/S0036144596322507}\n }\n\n\nWhich references an article by the same author:\n\nhttp://dx.doi.org/10.1090/S0025-5718-1988-0935077-0\n\n::\n\n @article{fornberg_generation_1988,\n title={Generation of finite difference formulas on arbitrarily spaced grids},\n author={Fornberg, Bengt},\n journal={Mathematics of computation},\n volume={51},\n number={184},\n pages={699--706},\n year={1988}\n doi={10.1090/S0025-5718-1988-0935077-0}\n }\n\nYou may want to, in addition to the paper, cite finitediff (for e.g. reproducibility),\nand you can get per-version DOIs from the zenodo archive:\n\n.. image:: https://zenodo.org/badge/14988640.svg\n :target: https://zenodo.org/badge/latestdoi/14988640\n :alt: Zenodo DOI\n\n\nLicensing\n---------\nThe source code is Open Source and is released under the very permissive\n`\"simplified (2-clause) BSD license\" `_.\nSee `LICENSE `_ for further details.\n\n\nAuthor\n------\nBj\u00f6rn Ingvar Dahlgren, contact:\n - gmail address: bjodah\n - kth.se address: bda\n\nSee file `AUTHORS `_ in root for a list of all authors.", "description_content_type": "", "docs_url": "https://pythonhosted.org/finitediff/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bjodah/finitediff", "keywords": "finite-difference,taylor series,extrapolation,interpolation", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "finitediff", "package_url": "https://pypi.org/project/finitediff/", "platform": "", "project_url": "https://pypi.org/project/finitediff/", "project_urls": { "Homepage": "https://github.com/bjodah/finitediff" }, "release_url": "https://pypi.org/project/finitediff/0.6.2/", "requires_dist": null, "requires_python": "", "summary": "Finite difference weights for any derivative order on arbitrarily spaced grids.", "version": "0.6.2" }, "last_serial": 4007294, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "0ed40b87e6fe442f7d74b778bdc463cd", "sha256": "7a4f021fe428fa6e315645b8c568901b1541b730c09f185e8e62af1b831bde56" }, "downloads": -1, "filename": "finitediff-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0ed40b87e6fe442f7d74b778bdc463cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 106505, "upload_time": "2015-09-03T13:23:37", "url": "https://files.pythonhosted.org/packages/21/44/48a2879744803aaf59fb344d92f09c1bc83777366310aa9270e189c20d87/finitediff-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "dc054c190b8c9e2f1bb193d1078374c0", "sha256": "78ead29ff64c6f77693a3a53aa1b0099d33d2148f219c9d7502e83b9a8010dc3" }, "downloads": -1, "filename": "finitediff-0.2.1.tar.gz", "has_sig": false, "md5_digest": "dc054c190b8c9e2f1bb193d1078374c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 113686, "upload_time": "2016-04-08T19:36:28", "url": "https://files.pythonhosted.org/packages/66/82/e758f19332585298ad0ce05a64723b7a31c901f5eb01805c3609ef3bd5f2/finitediff-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "bb5431fa306b95788e878a15854e5814", "sha256": "1aede63bf1fe5d7d77c1b5fa4d6a6da68a7a50314a9799d0172b00a5a55bbd3f" }, "downloads": -1, "filename": "finitediff-0.2.2.tar.gz", "has_sig": false, "md5_digest": "bb5431fa306b95788e878a15854e5814", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114689, "upload_time": "2016-07-13T15:16:32", "url": "https://files.pythonhosted.org/packages/fe/3c/5fae3e0215ed19b36b5a7844e7569415c5ce5cdbbcd7092dd03cfc0405ad/finitediff-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "74c6ce69f1fbc2a94fbefb52893754ee", "sha256": "ca2fb5eb008eaaade11eafb5a05f90e925a8b1d576a4f054d74aba5ea3683896" }, "downloads": -1, "filename": "finitediff-0.2.3.tar.gz", "has_sig": false, "md5_digest": "74c6ce69f1fbc2a94fbefb52893754ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 114702, "upload_time": "2016-07-16T10:46:43", "url": "https://files.pythonhosted.org/packages/8e/75/c99a6e95170c94950939ee4340949044a829334b03f47f89c3f2a4278677/finitediff-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "47b93379750625790553a8a61c59ec4c", "sha256": "27e64dc9b42777f412e44efea9fc90a2bac13fee849e1f845b0953e59ef2d214" }, "downloads": -1, "filename": "finitediff-0.2.4.tar.gz", "has_sig": false, "md5_digest": "47b93379750625790553a8a61c59ec4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 115364, "upload_time": "2016-08-17T13:36:42", "url": "https://files.pythonhosted.org/packages/8b/f1/657115a722e8573cdb5cd768d36c9f13181ebde30f86c21c0666d1730ddb/finitediff-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "5b04e5e4b5bab1557b9babb03b1f6354", "sha256": "77e49b8e3554eb5d182771b8ea72b7d07472ae583e00b5da49a0a364dae83ca4" }, "downloads": -1, "filename": "finitediff-0.2.5.tar.gz", "has_sig": false, "md5_digest": "5b04e5e4b5bab1557b9babb03b1f6354", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 115535, "upload_time": "2016-08-17T15:06:52", "url": "https://files.pythonhosted.org/packages/27/9f/58dade3716d52fca70e5577f7681def519a679d1d7b04e141c7264ae1c0d/finitediff-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "784af6e5fd4a1d929a57c994dcbc9f2e", "sha256": "4224b9f4e75fddd34e356f05c75404cb2c98f4c86c3e0d1d16bca4f7ddb01108" }, "downloads": -1, "filename": "finitediff-0.3.0.tar.gz", "has_sig": false, "md5_digest": "784af6e5fd4a1d929a57c994dcbc9f2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116509, "upload_time": "2016-08-23T12:41:36", "url": "https://files.pythonhosted.org/packages/4f/58/0457dca80aac3cecbcf982132f796cf68184b90e531b37b5fd57c67c5592/finitediff-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "c7038dd30ffae9c36be3d63c1798e2be", "sha256": "a1864e22ccadb920dc00647bf866a1b684329a77888ef6f19b5bc705110f7bd0" }, "downloads": -1, "filename": "finitediff-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c7038dd30ffae9c36be3d63c1798e2be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 117227, "upload_time": "2016-08-24T15:54:48", "url": "https://files.pythonhosted.org/packages/40/8f/320a524184729cad5f9ee3e8eca093633108cf731c2911e8ce5be9d84388/finitediff-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "aede4f130cddd32d855bb5115d4357ad", "sha256": "23d8602ac5fb74b905754ac68660bc7f66bbfb6148779e95f7ebcfdaa04ae040" }, "downloads": -1, "filename": "finitediff-0.3.2.tar.gz", "has_sig": false, "md5_digest": "aede4f130cddd32d855bb5115d4357ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 117579, "upload_time": "2016-09-07T10:56:56", "url": "https://files.pythonhosted.org/packages/24/53/2bcf4a33343864bde65d8670a1bfd1f849410f04d7297067a9d35f454846/finitediff-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "26f6ae377e98d05187f4b33f732aec71", "sha256": "ba796b8aa1142a7ad60a77b7ac0e3cc9e573431d115da2c508d688f7a5481ecd" }, "downloads": -1, "filename": "finitediff-0.3.3.tar.gz", "has_sig": false, "md5_digest": "26f6ae377e98d05187f4b33f732aec71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 122291, "upload_time": "2016-12-14T13:51:42", "url": "https://files.pythonhosted.org/packages/4b/46/8f9ef58d3543d516a0378f378a7b8b8363afe6bd74d5eecf6f57d5f7ffb4/finitediff-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "57fa0f023ab4f1e820eacef8233234ba", "sha256": "cc7d348669bd805cfe6b378427da86ec69d4afa9f2a4cfe9a4c47adbb87a4787" }, "downloads": -1, "filename": "finitediff-0.3.4.tar.gz", "has_sig": false, "md5_digest": "57fa0f023ab4f1e820eacef8233234ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124226, "upload_time": "2016-12-14T16:25:47", "url": "https://files.pythonhosted.org/packages/48/b3/72ecc40f44ec204e761217888ea3966fdb9b227d7b7187754a5e835b7788/finitediff-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "5a6b6e9b8ffb27fee49710f9699054c1", "sha256": "cfcdef6fbec4e69bb25d742ab922cda040b84b7e478a7d2634f4c90d6d5cf3bc" }, "downloads": -1, "filename": "finitediff-0.3.5.tar.gz", "has_sig": false, "md5_digest": "5a6b6e9b8ffb27fee49710f9699054c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 127886, "upload_time": "2017-03-14T10:45:50", "url": "https://files.pythonhosted.org/packages/5b/e4/af6f80c37e1dbea535b10d99872e54566d9bbf1c6da18f6674cf5d927d62/finitediff-0.3.5.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8690d76505ad6383dabe48a73ae4a2a7", "sha256": "d42cc72f8e202dea11cddd71cee5766bb98acedcc0e39ae3b3138ca6afabeec8" }, "downloads": -1, "filename": "finitediff-0.4.0.tar.gz", "has_sig": false, "md5_digest": "8690d76505ad6383dabe48a73ae4a2a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 140982, "upload_time": "2018-04-23T15:42:56", "url": "https://files.pythonhosted.org/packages/44/b4/dda3b1f0808b79712f35e147a0df3234e948a0883715613b08761e8e37f9/finitediff-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "561eb4e54fdfdf3c693dd16b0a29c6b6", "sha256": "5113f999a8d9d9d8141826229b98e59b1ecc712a1b51510ca1fb20f657cdc0a9" }, "downloads": -1, "filename": "finitediff-0.5.0.tar.gz", "has_sig": false, "md5_digest": "561eb4e54fdfdf3c693dd16b0a29c6b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 84597, "upload_time": "2018-05-23T17:59:04", "url": "https://files.pythonhosted.org/packages/f2/1e/6cbdf0ab80c79e2c1d200fe6811ed27c54f37487fcf2ec4e75b74bc2a22d/finitediff-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "f3792f2790e5070c1df8f551f50a1ede", "sha256": "4b7d6ec2c04c83236884e72e800f9202384206690aef3c9b223454829ab3b511" }, "downloads": -1, "filename": "finitediff-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f3792f2790e5070c1df8f551f50a1ede", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 85878, "upload_time": "2018-05-24T14:27:46", "url": "https://files.pythonhosted.org/packages/20/a7/6bea11e43dd220d3932d80a265eba066e2ab8dc723e9c79ed43953fa0e6d/finitediff-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "4708e7701da92d2552b7e22c8d107ccd", "sha256": "29a2fe06a8bcc8b65080da86a246e5bd683f19667ad54bad883f75164c2736f3" }, "downloads": -1, "filename": "finitediff-0.5.2.tar.gz", "has_sig": false, "md5_digest": "4708e7701da92d2552b7e22c8d107ccd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 84365, "upload_time": "2018-05-29T11:21:17", "url": "https://files.pythonhosted.org/packages/78/d1/dc388b80d66470a2ef3f99189f1cc2fa631bcb3c61b10ab4954fa25b7b4b/finitediff-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "b59449bda36b2133757433d51adaba57", "sha256": "e25a23254cc165e9d988d2ee1b479cb71b88d59bfb34fabef9cce28646e43770" }, "downloads": -1, "filename": "finitediff-0.5.3.tar.gz", "has_sig": false, "md5_digest": "b59449bda36b2133757433d51adaba57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 84377, "upload_time": "2018-05-29T11:30:48", "url": "https://files.pythonhosted.org/packages/84/12/559e5df89695e7768bc5f75b4aca229a38c1f791768c23757c9f50d6855e/finitediff-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "6db5ac2b0d85de717292171945442abd", "sha256": "dc47905696a61677e692f7b29ede45e3303e332c67299bf0c0295dc6c1debf0e" }, "downloads": -1, "filename": "finitediff-0.5.4.tar.gz", "has_sig": false, "md5_digest": "6db5ac2b0d85de717292171945442abd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 84392, "upload_time": "2018-05-31T10:42:03", "url": "https://files.pythonhosted.org/packages/0e/26/3569d33f106a0c211e61882d4de2032af3dd7ca24fb43cd36cf7239a9b5f/finitediff-0.5.4.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "11f906427b65ee607ee4736595f3fbc4", "sha256": "3d18b39ae0a510e209ad414a87015ec1d7caa46e71f31c91d563e5e7e5f344d3" }, "downloads": -1, "filename": "finitediff-0.6.0.tar.gz", "has_sig": false, "md5_digest": "11f906427b65ee607ee4736595f3fbc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 90833, "upload_time": "2018-06-27T11:20:42", "url": "https://files.pythonhosted.org/packages/43/08/14e0d2120c3726a2ac57e1353cfe0541e8760f662da668c0550cb7557444/finitediff-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "b38baf2861b9d9078fb9e3783e27f163", "sha256": "2ae9ab254645b846b2a5cf6b684147b583a714c6f075b7a7f4aafd0575dea0b9" }, "downloads": -1, "filename": "finitediff-0.6.1.tar.gz", "has_sig": false, "md5_digest": "b38baf2861b9d9078fb9e3783e27f163", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 91259, "upload_time": "2018-06-27T12:35:17", "url": "https://files.pythonhosted.org/packages/00/74/ad901dddcd4708e577b8dea33ebe302bd67d60b29d5ab2540945d80920d1/finitediff-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "d28295493412dbc1c4533fe3bfa5f0cf", "sha256": "c0ac3607c9f5211d6e9125f1a300422f85b3a898cb5d3c62185ec94affac2ab0" }, "downloads": -1, "filename": "finitediff-0.6.2.tar.gz", "has_sig": false, "md5_digest": "d28295493412dbc1c4533fe3bfa5f0cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 91261, "upload_time": "2018-06-27T12:52:17", "url": "https://files.pythonhosted.org/packages/17/bd/c31c82dbd0473b8db9eeade6cc8c49e245a37b74a00f185bdfc152f5d20a/finitediff-0.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d28295493412dbc1c4533fe3bfa5f0cf", "sha256": "c0ac3607c9f5211d6e9125f1a300422f85b3a898cb5d3c62185ec94affac2ab0" }, "downloads": -1, "filename": "finitediff-0.6.2.tar.gz", "has_sig": false, "md5_digest": "d28295493412dbc1c4533fe3bfa5f0cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 91261, "upload_time": "2018-06-27T12:52:17", "url": "https://files.pythonhosted.org/packages/17/bd/c31c82dbd0473b8db9eeade6cc8c49e245a37b74a00f185bdfc152f5d20a/finitediff-0.6.2.tar.gz" } ] }