Skip to main content

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.

Metadata

Release files for derivative-mode 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for derivative-mode 0.5
File Size Uploaded Provenance Actions
derivative_mode-0.5.tar.gz 2.4 kB Without provenance Details for derivative_mode-0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for derivative-mode 0.5
File Interpreter ABI Platform Actions
derivative_mode-0.5-py3-none-any.whl Python 3 none any Details for derivative_mode-0.5-py3-none-any.whl

Total release size: 5.2 kB

Release files / derivative_mode-0.5.tar.gz

Download URL derivative_mode-0.5.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3df4eca05f2f7ced00a02a799107663370321f100c5d15427201de7d2eddab6a
BLAKE2b-256 checksum
How to use checksums
597164d326ee26bec4a07d10fe4137d0a1af590d2954607842c4bde8bc615cc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / derivative_mode-0.5-py3-none-any.whl

Download URL derivative_mode-0.5-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f349c860e2c5737fc9c3a1867eb9c0b27ef713dcac4bd0e0ef8ff83ad171b24f
BLAKE2b-256 checksum
How to use checksums
6ab59c6b3c5cfc85a9b4bd603d601a47b019be983fa76285a636107da027148d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Security for derivative-mode 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page