Skip to main content

Fast Mathematical exp evaluator for numpy

Project description

colss

Fast expression evaluator for NumPy.

GitHub: https://github.com/SivaPA08/colss


Features

Category Support
Arithmetic + - * / %
Bitwise & | ~ << >> ^
Logical && || !
Comparison == != < <= > >=
Ternary ?:
Trigonometric sin cos tan asin acos atan
Logarithmic log log10
Exponential exp
Root sqrt
Rounding floor ceil round
Utility abs min max

Installation

pip install colss

Usage

import numpy as np
import colss as cs

a = np.array([1.0, 2.0, 3.0])
b = np.array([4.0, 5.0, 6.0])

print(cs.query("a + b", a=a, b=b))
print(cs.query("sqrt(a) + sin(b)", a=a, b=b))
print(cs.query("a > b ? a : b", a=a, b=b))
print(cs.query("max(1,1,3,1,1)"))

Syntax

a + b
a - b
a * b
a / b
a % b
a ^ b

(a + b) * c

a > b
a <= b
a == b

(a > 0) && (b > 0)
(a > 0) || (b > 0)
!(a > 0)

a > b ? a : b

Functions

abs(x)
sqrt(x)
log(x)
log10(x)
exp(x)
sin(x)
cos(x)
tan(x)
asin(x)
acos(x)
atan(x)
floor(x)
ceil(x)
round(x)
min(...)
max(...)

min() and max() support multiple arguments.

cs.query("max(1,1,3,1,1)")
cs.query("min(a,b,c,d)")

Multidimensional Arrays

colss supports multidimensional arrays directly.

import numpy as np
import colss as cs

a = np.random.rand(2, 3, 4)
b = np.random.rand(2, 3, 4)

res = cs.query("a + b", a=a, b=b)
print(res.shape)

Notes

  • Arrays in the same expression must have identical shapes.
  • query() returns a NumPy array.
  • For best performance, use float64 and C-contiguous arrays.
  • No constants are built in.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

colss-0.3.1-cp313-cp313-win_amd64.whl (116.0 kB view details)

Uploaded CPython 3.13Windows x86-64

colss-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (257.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

colss-0.3.1-cp313-cp313-macosx_15_0_arm64.whl (347.7 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

colss-0.3.1-cp312-cp312-win_amd64.whl (116.0 kB view details)

Uploaded CPython 3.12Windows x86-64

colss-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (257.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

colss-0.3.1-cp312-cp312-macosx_15_0_arm64.whl (347.6 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

colss-0.3.1-cp311-cp311-win_amd64.whl (114.6 kB view details)

Uploaded CPython 3.11Windows x86-64

colss-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (255.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

colss-0.3.1-cp311-cp311-macosx_15_0_arm64.whl (345.4 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

colss-0.3.1-cp310-cp310-win_amd64.whl (113.6 kB view details)

Uploaded CPython 3.10Windows x86-64

colss-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (254.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

colss-0.3.1-cp310-cp310-macosx_15_0_arm64.whl (344.3 kB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

colss-0.3.1-cp39-cp39-win_amd64.whl (114.0 kB view details)

Uploaded CPython 3.9Windows x86-64

colss-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (254.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

colss-0.3.1-cp39-cp39-macosx_15_0_arm64.whl (344.6 kB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

Details for the file colss-0.3.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: colss-0.3.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 116.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a711187cfe3685171b92f4219155d7cc8b43108c031704a76b2ffa79f8084064
MD5 e245d9894c0a90b845ac2892056506a1
BLAKE2b-256 b665b85edef8747aee9fc02aaa355c780358159e7b96ca05aa30eedbd44e2891

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e063be677019610a0abed4759cffe8ced485af5e743019a7accdc4cd0a9de85
MD5 3fc7456ee306c1d46e8366283e1a9b21
BLAKE2b-256 9a6fcd4839e5bb945102c115064f6b5cf7d7cc3affca9768ba95cd6a4aa5179e

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a4846a9ef4fe4a990ffb51221b51898dc3e1380d81858230b2f7742a2d6ab6d9
MD5 b54e5e8739b7d76e71b5bfc809fcfe2f
BLAKE2b-256 dfd616293ca4663220240eff90105e2fcdd481f8151c5ebb191583a0383c4e47

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: colss-0.3.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 116.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 232307268799da9263acec38f0110c10845d8e9052ef68c113de36f07db9a205
MD5 c4503a24a1c492fc3488573e0b5e910a
BLAKE2b-256 534deb868b713ed6390668e14e44fff62cb4c36f4df3f3d58d2dc1b68f36b636

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74b81a678265ab44403aa3b0cdfeb6b1ede473ea8c6650c7e4476d8c8954adef
MD5 4565c0dc7404178e634b0ca51956460b
BLAKE2b-256 27d81749a0bfecef1abaf405a0181d8df5311c8f3381ccdd2506a8b20444a2ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7e8c9f051e96b792c0c78bb0b84e560eed720fc6f4096805c739492649dc5446
MD5 cc36f4463ebbe995f16039e3799623ec
BLAKE2b-256 a37b95bf35a3fd1b9959ed7a361e4a09f2208e814812a389226dbe73c50d232b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: colss-0.3.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 114.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bb1b00965f6117f818022721081d68777916374aa669459a3240731d6fd56906
MD5 2d9fb84b86e3758e96aca66a1333d819
BLAKE2b-256 1ecf6312460088b4a3e41af1b9463bcc270965d7d569b05d4766bb64460d99c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d8d0ce481475ef2c6ead1b9fc12f09c14b735098d13f1de53967d1001425e02
MD5 aeaf5216d9054a016c63e890e0e6fb8c
BLAKE2b-256 715b5e80ff4d67d7022f5781e944c98bcd19df698ddc4d6f0b628cbf9795d1fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 96a7c391b374fc8ec7dc4a32c9244b704518b9b6c74499764c18b314d6f09bad
MD5 adfb2934ef0bff423b41200403afffa4
BLAKE2b-256 dc07b87f0d48cbf3db507f929b86744bb1e60dabe5182b1bfdbc3748ce493d10

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: colss-0.3.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 113.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6d6e779e009a87d4baff5995108bba345b509f6dca23058b366e9de37e921441
MD5 45191ed19f17d73764991ff20483077f
BLAKE2b-256 7a568f600c21523ae8459fe5e8821e460b78a7010458f67e53ed7909380dad2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87e040993df83aef640d99364fb883f9c5ebff685401ab9d556665e04e519944
MD5 2178657e88e4facccfd7a8c8a5b826e9
BLAKE2b-256 e65d08684c714d6267ecc8eb576ab95bac1638d81ac5894a2a977722631b989c

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 20cff7daed194d5859a45c8ed853f6a61891071daf1d5526e8d0a708caba4b13
MD5 8d804436d0d2dd1da5f701d0559ac32a
BLAKE2b-256 75f2dfeba2b1148af3ceef48b27a9c8f6e6a780e99db437786ad3173b616e74b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: colss-0.3.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 114.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb61a30c4e9780661c3195fcbe6729a76b6a577b41ced61301374c6f53bb43bd
MD5 bb3fe3857c9d3859b31a79b408c261a7
BLAKE2b-256 18cd4d4f11a1cdb3bf9727cc967a9eeddefba4855ab2e150755c30d43838f54d

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp39-cp39-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b30c90a79860c0d839400a9dc82aad15bcf07125e8f2df6188215743b2e4012
MD5 987a4d5ff42053e08587b963d45d6ed1
BLAKE2b-256 a7325789a22d5cc0533f580174c3d85f2445d96af1badc8ce3d01c61648dcb25

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file colss-0.3.1-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: colss-0.3.1-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 344.6 kB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for colss-0.3.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 71e9e9773c26035e2597b5c8d58e01be8b14b47df472d130dad2d0d967adbe51
MD5 7a7bbefa3fa61163050cdcea52ddc649
BLAKE2b-256 867ed0e2cd3e168770a1c7b9e033fc392504bf01cdc2677550d51f1d60f5dc6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.3.1-cp39-cp39-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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