# Derivative Library
This code is a library for calculating derived functions.
## Installation
To install the library, use pip:
pip install derivative_mode
## Usage
To use the library, import the `Derivative` class from the library:
from derivative_mode import Derivative
Then you can create an instance of the `Derivative` class by passing the function you want to differentiate as an argument:
python def func(x):
return x**2
derivative = Derivative(func)
## Methods
### tailor_app
Calculates the derivative of the function at the point `x0` using the Taylor method.
Usage example:
result = derivative.tailor_app(2)
### polinom_app
Calculates the derivative of the function at the point `x0` using the polynomial method.
Usage example:
result = derivative.polinom_app(2)
### second_derivative
Calculates the second derivative of the function at the point `x0`.
Usage example:
result = derivative.second_derivative(2)
### threepoint_pattern(x0, second_deriv=False)
Calculates the first or second derivative of a function at the point `x0` using the three-point method.
Usage example:
result = derivative.threepoint_pattern(2, second_deriv=True)
## Exception handling
If the function was set using a grid, the methods `tailor_app`, `polinom_app` and `threepoint_pattern` will throw an exception. If an error occurred while using the function, the methods will also throw an exception.
## License
This library is available under the MIT license.
Raw data
{
"_id": null,
"home_page": "https://github.com/Mun-Robbery",
"name": "derivative-mode",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "numerical derivative",
"author": "antrisole",
"author_email": "gleb.zar.03@mail.ru",
"download_url": "https://files.pythonhosted.org/packages/59/71/64d326ee26bec4a07d10fe4137d0a1af590d2954607842c4bde8bc615cc4/derivative_mode-0.5.tar.gz",
"platform": null,
"description": "# Derivative Library\r\n\r\nThis code is a library for calculating derived functions.\r\n\r\n## Installation\r\n\r\nTo install the library, use pip:\r\n\r\n pip install derivative_mode\r\n\r\n## Usage\r\n\r\nTo use the library, import the `Derivative` class from the library:\r\n\r\n from derivative_mode import Derivative\r\n\r\nThen you can create an instance of the `Derivative` class by passing the function you want to differentiate as an argument:\r\n\r\n python def func(x):\r\n return x**2\r\n derivative = Derivative(func)\r\n\r\n## Methods\r\n\r\n### tailor_app\r\n\r\nCalculates the derivative of the function at the point `x0` using the Taylor method.\r\n\r\nUsage example:\r\n\r\n result = derivative.tailor_app(2)\r\n\r\n### polinom_app\r\n\r\nCalculates the derivative of the function at the point `x0` using the polynomial method.\r\n\r\nUsage example:\r\n\r\n result = derivative.polinom_app(2)\r\n\r\n### second_derivative\r\n\r\nCalculates the second derivative of the function at the point `x0`.\r\n\r\nUsage example:\r\n\r\n result = derivative.second_derivative(2)\r\n\r\n### threepoint_pattern(x0, second_deriv=False)\r\n\r\nCalculates the first or second derivative of a function at the point `x0` using the three-point method.\r\n\r\nUsage example:\r\n\r\n result = derivative.threepoint_pattern(2, second_deriv=True)\r\n\r\n## Exception handling\r\n\r\nIf the function was set using a grid, the methods `tailor_app`, `polinom_app` and `threepoint_pattern` will throw an exception. If an error occurred while using the function, the methods will also throw an exception.\r\n\r\n## License\r\n\r\nThis library is available under the MIT license.\r\n",
"bugtrack_url": null,
"license": "",
"summary": "This module destined to calculation of derivatives using numerical methods",
"version": "0.5",
"project_urls": {
"GitHub": "https://github.com/Mun-Robbery",
"Homepage": "https://github.com/Mun-Robbery"
},
"split_keywords": [
"numerical",
"derivative"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ab59c6b3c5cfc85a9b4bd603d601a47b019be983fa76285a636107da027148d",
"md5": "e945f9791b361ad0cdc75423e40f11f4",
"sha256": "f349c860e2c5737fc9c3a1867eb9c0b27ef713dcac4bd0e0ef8ff83ad171b24f"
},
"downloads": -1,
"filename": "derivative_mode-0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e945f9791b361ad0cdc75423e40f11f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2726,
"upload_time": "2023-12-10T23:51:02",
"upload_time_iso_8601": "2023-12-10T23:51:02.594457Z",
"url": "https://files.pythonhosted.org/packages/6a/b5/9c6b3c5cfc85a9b4bd603d601a47b019be983fa76285a636107da027148d/derivative_mode-0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "597164d326ee26bec4a07d10fe4137d0a1af590d2954607842c4bde8bc615cc4",
"md5": "75f3204e9ae4dfbef7946732f9296e55",
"sha256": "3df4eca05f2f7ced00a02a799107663370321f100c5d15427201de7d2eddab6a"
},
"downloads": -1,
"filename": "derivative_mode-0.5.tar.gz",
"has_sig": false,
"md5_digest": "75f3204e9ae4dfbef7946732f9296e55",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2439,
"upload_time": "2023-12-10T23:51:05",
"upload_time_iso_8601": "2023-12-10T23:51:05.192785Z",
"url": "https://files.pythonhosted.org/packages/59/71/64d326ee26bec4a07d10fe4137d0a1af590d2954607842c4bde8bc615cc4/derivative_mode-0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-10 23:51:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "derivative-mode"
}