Skip to main content

A general purpose Python math module

Project description

Build Status Documentation Status PyPI version fury.io PyPI license PyPI pyversions Downloads per month

LibPyMath

A fast, general purpose Python math library


Install

Run pip install libpymath to dowload and install libpymath for your operating system and python version. There are also wheels provided for many of the latest Python versions on Windows, Mac OS and Linux thanks to the cibuildwheel project.


Features and usage

Matrix math

Easily create, manipulate and perform calculations with dense matrices. The matrices themselves are stored and manipulated with optimised C code, resulting in faster operations and more efficient calculations.

The matrix library is currently very primitive and supports very few operations, though is constantly being expanded on and improved. Many ease of use features also exist, such as the ability to format and print a matrix, alligning the decimal points (if present) and providing brackets in the relevant places.

For example, the following creates a new matrix from a 2d list of data

# Import the Matrix object from the matrix library
from libpymath.matrix import Matrix

# Create the data
matrixData = [[1, 2, 3],
              [4, 5, 6],
              [7, 8, 9]]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[1.0, 2.0, 3.0]
     [4.0, 5.0, 6.0]
     [7.0, 8.0, 9.0]]

Here is another example to show the formating abilities of libpymath's matrix type. The decimal points, commas and brackets are all alined on a per-row basis, saving space and producing a nicer result.

# Create the data
matrixData = [[1, 2, 3.14159],
              [4, 5000, 6],
              [7, 8, 9]]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[1.0,    2.0, 3.14159]
     [4.0, 5000.0, 6.0    ]
     [7.0,    8.0, 9.0    ]]

The example below shows what happens when printing a large matrix, as the entire thing could not fit on the screen -- libpymath shows only the corners, missing out the middle section of the matrix on both the x and y axis, allowing large matrices to be printed quickly and using a small amount of space.

# Create the data for a 1000x1000 matrix
rows = 1000
cols = 1000
matrixData = [[j + i * cols for j in range(rows)] for i in range(cols)]

# Produce a new Matrix with the data
mat = Matrix(data=matrixData)

# Print the matrix
print(mat)

>>> [[     0.0,      1.0,      2.0  ***     997.0,    998.0,    999.0]
     [  1000.0,   1001.0,   1002.0  ***    1997.0,   1998.0,   1999.0]
     [  2000.0,   2001.0,   2002.0  ***    2997.0,   2998.0,   2999.0]
           ***       ***       ***            ***       ***       ***  
     [997000.0, 997001.0, 997002.0  ***  997997.0, 997998.0, 997999.0]
     [998000.0, 998001.0, 998002.0  ***  998997.0, 998998.0, 998999.0]
     [999000.0, 999001.0, 999002.0  ***  999997.0, 999998.0, 999999.0]]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libpymath-0.0.61.tar.gz (13.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libpymath-0.0.61-cp38-cp38-manylinux1_x86_64.whl (62.4 kB view details)

Uploaded CPython 3.8

libpymath-0.0.61-cp38-cp38-manylinux1_i686.whl (64.8 kB view details)

Uploaded CPython 3.8

libpymath-0.0.61-cp37-cp37m-manylinux1_x86_64.whl (61.6 kB view details)

Uploaded CPython 3.7m

libpymath-0.0.61-cp37-cp37m-manylinux1_i686.whl (64.0 kB view details)

Uploaded CPython 3.7m

libpymath-0.0.61-cp36-cp36m-manylinux1_x86_64.whl (61.6 kB view details)

Uploaded CPython 3.6m

libpymath-0.0.61-cp36-cp36m-manylinux1_i686.whl (64.0 kB view details)

Uploaded CPython 3.6m

libpymath-0.0.61-cp35-cp35m-manylinux1_x86_64.whl (61.6 kB view details)

Uploaded CPython 3.5m

libpymath-0.0.61-cp35-cp35m-manylinux1_i686.whl (64.0 kB view details)

Uploaded CPython 3.5m

File details

Details for the file libpymath-0.0.61.tar.gz.

File metadata

  • Download URL: libpymath-0.0.61.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for libpymath-0.0.61.tar.gz
Algorithm Hash digest
SHA256 f0c2e9be32e7c7d5b2fab43184baf84dddef6f437af6db123ae847592178cce7
MD5 527eb2350187831ff30d7a75532927b1
BLAKE2b-256 241ea529aef750072800934af43e72978140f8ea6a479574a7383ed998cfd541

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 505499d1b10405a54b1c4d755a42101e26b3c35ab02f66696852e398590a703d
MD5 505ec22e47e13cdbbb20fb5a8c0db0ad
BLAKE2b-256 c149a12a7c1a92f089ab1264475db3c34db9648f3913ceeb0dbacd5cb619afdc

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 64.8 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 9b567164c2f02a04679b10a2edee3c816ffabce42e9fd88c635bac5c6accdb0d
MD5 21af9188646db8041edb157165d8ef83
BLAKE2b-256 c926771d8e02f9d59e3e01e47dedc682b319fb542e75a9588a606826a9f91efc

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 af5ef68dee46aafa79acd71839310772108bba953edfb56ddb926e0777a593af
MD5 c004906f19ca12e4c49e5a444345802d
BLAKE2b-256 a5371ea97611be2ae66d36502c67164fbe208f53faedf33c549d091a36dd2a8d

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 e4692a823177403aed84a325e2e9bd8923a57816edf31e5cd5feefb5f817b9f5
MD5 2d86dbc12c0e3150af3b9f24ce3f4e37
BLAKE2b-256 33db613907918e39faee44e9768a03d81b34b4b639c91fa767b7be8f3c0d1379

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e9a88c86120e824166ee4cf43a0c4466a215319416a412fd26f4c36a870cf123
MD5 7eef3fe5779a21d90f860a664f89eaf0
BLAKE2b-256 2c4178b923de8423c522973a11f073d22b06963fd5fa44722bfd82249ff95976

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4f7a16b68c048d48f5b7e27e2a1708fa4b72074701517e19bcdc0d621bbda2cd
MD5 9b93ee93819235be231cd4535569b043
BLAKE2b-256 35e6afeb7871440a3a63c0444c256ef7de7de12e0e7ca7963c1b78f2aa9f0e38

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f7f49b28637b7c4e44ce8994692e3d29f6ffb21d0135d0a17afe72f0b77bd21e
MD5 77e7be3bd2b6d6be9a39a9724c32dd0e
BLAKE2b-256 783c4f25753f6c33fea09de3fb7f83d1762b6b058bb7a2dc6c9754afcc54d6ae

See more details on using hashes here.

File details

Details for the file libpymath-0.0.61-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: libpymath-0.0.61-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 64.0 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

File hashes

Hashes for libpymath-0.0.61-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7f22649e3ab6f2176f2a0a2aff8f46fa6f9760f0b7aef5445820a206188462d5
MD5 f84fd21c093ef32f4610b55e2a4ee06d
BLAKE2b-256 1f8f13c4b34d3e1b5da527c94ed70041b44801d1e2c559ffe77b0c3cfa3e500b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page