Skip to main content
http://www.math.univ-paris13.fr/~cuvelier/software/codes/Python/fc-bench/pyfc-bench_400.png

The fc_bench Python package allows to benchmark functions and much more

Introduction:

More documentation is available on fc_bench Python package dedicated web page with an User’s Guide (pdf).

Installation:

The fc_bench Python package is available from the Python Package Index, so to install/upgrade simply type

pip install fc_bench -U

Testing :

There are demos functions in the fc_bench.demos module named bench_*. For example, run the following code under Python:

from fc_bench import demos
demos.bench_Lagrange()

The output of this code is:

#---------------------------------------------------------------------------
# Setting inputs of Lagrange polynomial functions: y=LAGRANGE(X,Y,x)
# where X is numpy.linspace(a,b,n+1), Y=fun(X) and x is random values on [a,b]
#   n is the order of the Lagrange polynomial
#   fun function is: lambda x: np.sin(x)
#   [a,b]=[-1,1]
#   X: (n+1,) numpy array
#   Y: (n+1,) numpy array
#   x: (m,)   numpy array
#   Error[i] computed with fun[i] output:
#     lambda y: np.linalg.norm(y-fun(x),np.inf)
#---------------------------------------------------------------------------
# Benchmarking functions:
#   fun[0],            Lag: fc_bench.demos.Lagrange
#   fun[1],         lagint: fc_bench.demos.lagint
#---------------------------------------------------------------------------
# Comparative functions:
#   comp[i-1,0], compares outputs of fun[0] and fun[i]
#       lambda o1,o2: np.linalg.norm(o1-o2,np.inf)
#    For each comparative function:
#      - 1st input parameter is the output of fun[0]
#      - 2nd input parameter is the output of fun[i]
#---------------------------------------------------------------------------
#date:2019-12-21_16-56-34
#nbruns:5
#numpy:     <i8    <i8       f8           f8          f8           f8          f8
#format:  {:>5}  {:>5}  {:6.3f}     {:10.3e}     {:9.3f}     {:10.3e}     {:9.3e}
#labels:      m      n   Lag(s)     Error[0]   lagint(s)     Error[1]     comp[0]
            100      3    0.014    1.218e-03       0.019    1.218e-03   2.220e-16
            100      5    0.021    1.162e-05       0.028    1.162e-05   4.441e-16
            100      7    0.030    6.999e-08       0.037    6.999e-08   3.331e-16
            100     11    0.048    8.699e-13       0.056    8.689e-13   2.554e-15
            500      3    0.068    1.218e-03       0.095    1.218e-03   3.331e-16
            500      5    0.108    1.163e-05       0.144    1.163e-05   6.661e-16
            500      7    0.152    7.004e-08       0.190    7.004e-08   8.882e-16
            500     11    0.244    8.766e-13       0.282    8.766e-13   2.887e-15

Metadata

Release files for fc-bench 0.2.0

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

Source distribution (sdist)

Source distribution for fc-bench 0.2.0
File Size Uploaded Provenance Actions
fc_bench-0.2.0.tar.gz 11.3 kB Without provenance Details for fc_bench-0.2.0.tar.gz

Release files / fc_bench-0.2.0.tar.gz

Download URL fc_bench-0.2.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4eb490d370b72e1e3f88e7b369f00bf23148d604c6287ccba84f5b42a7b473c8
BLAKE2b-256 checksum
How to use checksums
a82d8d0ab764f0bacd6daccf3390a2221e803bc1015cd2c8b631da2404e4c709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

Security for fc-bench 0.2.0

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.

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