Skip to main content

Derivative Library

This code is a library for calculating derived functions.

Installation

To install the library, use pip:

pip install pyderivative==1.2

Usage

To use the library, import the Derivative class from the library:

from pyderivative.Derivative import Derivative

Then you can create an instance of the Derivative class by passing the function you want to differentiate as an argument:

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 pyderivative 1.2

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

Source distribution (sdist)

Source distribution for pyderivative 1.2
File Size Uploaded Provenance Actions
pyderivative-1.2.tar.gz 2.4 kB Without provenance Details for pyderivative-1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyderivative 1.2
File Interpreter ABI Platform Actions
pyderivative-1.2-py3-none-any.whl Python 3 none any Details for pyderivative-1.2-py3-none-any.whl

Total release size: 5.1 kB

Release files / pyderivative-1.2.tar.gz

Download URL pyderivative-1.2.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eaae28da824bac2cf45eefac219dbab247088cb1ad459adf283ae2ce75caa85b
BLAKE2b-256 checksum
How to use checksums
fef5df308f95a367b1fb0ec3ea62a97248e67c39ff9437a4766c677c20992752
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.2

Release files / pyderivative-1.2-py3-none-any.whl

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

Security for pyderivative 1.2

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

1.2 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