Skip to main content

Less verbose Mathematical exp evaluator for pandas,numpy and polar

Project description

colss

colss is a lightweight expression evaluator for NumPy, Pandas, and Polars. It simplifies mathematical expressions while preserving memory efficiency and execution speed through a compiled C++ backend.


Installation

Build using CMake:

mkdir build
cd build
cmake ..
make

Or build a Python wheel:

python -m build
pip install dist/colss-*.whl

Requirements

All arrays passed to colss must be:

  • 1D
  • Preferably float64
  • C-contiguous

If you have a 2D array:

a = a.ravel()

Usage Examples

All functions accept string expressions.

query

import numpy as np
import colss

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

result = colss.query("a+b+7")

Ternary example:

colss.query("a > 1 ? 100 : 0")

Using mathematical functions:

colss.query("sqrt(a) + sin(a)")
colss.query("exp(a)")

mean

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

m = colss.mean("a")

Expression example:

colss.mean("a+10")

sigma (Standard Deviation)

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

s = colss.sigma("a")

Expression example:

colss.sigma("a*2")

prod (Product)

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

p = colss.prod("a")

Expression example:

colss.prod("a+1")

Supported Operators

Arithmetic:

+  -  *  /  ^

Comparison:

>  <  >=  <=  ==  !=

Logical:

&&  ||

Ternary:

condition ? value_if_true : value_if_false

Available Functions Inside Expressions

abs(x)
sqrt(x)
pow(x, y)
log(x)
log10(x)
exp(x)
sin(x)
cos(x)
tan(x)
floor(x)
ceil(x)
min(x, y)
max(x, y)

Using with Pandas

import pandas as pd
import numpy as np
import colss

 df = pd.DataFrame({
    "a": [1.0, 2.0, 3.0],
    "b": [4.0, 5.0, 6.0]
})

# Pandas evaluation
 df["c"] = df.eval("a + b + 7")

# colss evaluation
 a = df["a"].to_numpy(dtype=np.float64)
 b = df["b"].to_numpy(dtype=np.float64)

 df["d"] = colss.query("a+b+7")

Notes

  • All variables used in expressions must be registered inside colss before evaluation.
  • All functions (query, mean, sigma, prod) accept string expressions.
  • Designed for memory efficiency and predictable performance.

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.1.7-cp313-cp313-win_amd64.whl (802.9 kB view details)

Uploaded CPython 3.13Windows x86-64

colss-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

colss-0.1.7-cp313-cp313-macosx_15_0_arm64.whl (950.7 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

colss-0.1.7-cp312-cp312-win_amd64.whl (803.0 kB view details)

Uploaded CPython 3.12Windows x86-64

colss-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

colss-0.1.7-cp312-cp312-macosx_15_0_arm64.whl (950.7 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

colss-0.1.7-cp311-cp311-win_amd64.whl (801.4 kB view details)

Uploaded CPython 3.11Windows x86-64

colss-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

colss-0.1.7-cp311-cp311-macosx_15_0_arm64.whl (948.8 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

colss-0.1.7-cp310-cp310-win_amd64.whl (800.8 kB view details)

Uploaded CPython 3.10Windows x86-64

colss-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

colss-0.1.7-cp310-cp310-macosx_15_0_arm64.whl (947.4 kB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

colss-0.1.7-cp39-cp39-win_amd64.whl (801.4 kB view details)

Uploaded CPython 3.9Windows x86-64

colss-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

colss-0.1.7-cp39-cp39-macosx_15_0_arm64.whl (947.4 kB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for colss-0.1.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e2a8638e7b53a36d9e83fb89db8e6ced464a33a90c540fbeaccfa4b668afbf1e
MD5 16d95af03b92a2e781dd97eb611ce54c
BLAKE2b-256 2592f2ffb97dd2eb13ff30762ee390f3aa7f01d3872162f387cb6b4d602acd90

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11290ddfe9bdc0434860445d45c1c66ef3071837a94fcd21e24fd4d8c4eb35c7
MD5 69702fd18041c82afeb7931f0bb9c152
BLAKE2b-256 95b12cece3e8a1c838b289a3ea842e7a5f0303d1fd7fc9e25bbb0a601cd54c54

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3a3ae59798d5f9cef3b791f00cf96e6cc61643642d21f77b1bd8c8314f157d0d
MD5 cdbce00be4766ac1beaf2132c70be794
BLAKE2b-256 50a2382f49a0d2353c90b0b20f0a8de08ce2ecc32030f4773836aff8a49b27d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for colss-0.1.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f6b1171fe6a5ee4ab1bb7464841da65c288e8231dc2b64bfd2535b1678107f7e
MD5 96cea66a3ffe5e198d08c7c6ae451036
BLAKE2b-256 fddfebc63ba6c11bcb6ee738564a53650da741da41778ad66b70dc6ceb4fae6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 30173c70bb526a18d6a6e604c4ae9175760fed90cf482928dfbfc25dd015b185
MD5 0697be048b4515071d9a74eb2959892b
BLAKE2b-256 a7607f0d6a134801fe9b6f515ff91d5e5dbb72acd716bc83e1a0670350cb5fae

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6e11e20b6532e29bb01d7d28f15ec2a5bfc53e35bda359cd0da48f89bab4a42c
MD5 401842c51f2a1f852369e07b111956dc
BLAKE2b-256 e74f5c77d4fcedb626bfea08e6c43d9bfaa2a789978e279fd1e53baf3cb4d70f

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for colss-0.1.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1f002d50f192e583ab5fb6ceb681682778afacb724b934a314bf353529e96e86
MD5 bcdc348136f156429037f13170886142
BLAKE2b-256 451f4762328db2a76f05db5fad3d02ac47c3752e46be1ceabd617d460a221667

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c75e1be315fa8a936751736ab530e98024185449cbe1ace51ab76c50b1056d4a
MD5 96fd410a71f9e4d9d59279a77344afd4
BLAKE2b-256 9f8601c0cbecacbb0cb51513fab39d851f0d39c1af8b78382dc72de1d5d957d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 665118ee74ccce611de7aa1a8570f3a5a7fe011ab40c5081ac4980268d2ce3ae
MD5 20ea948f87922addbb8ec5d8a9cff1fc
BLAKE2b-256 e683e3aeb03c5e75f3ec6c5d49fd1a44fd62632223cac58528588e4e8e339e36

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp310-cp310-win_amd64.whl.

File metadata

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

File hashes

Hashes for colss-0.1.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b6133672dd17a1c441f49a26ba0833c3f705fb438a240551f2a702991ed5e963
MD5 bc9505f607518084c8080b45934b1193
BLAKE2b-256 ffdc0de0d2ac21ef04e7d4ece85ad59c65c4fc1c4d12ab6465e7c078f33b3933

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc8c8973ea82903a798d6a0fed96a63545cfd06f54fcd0237e7bdca832ec4236
MD5 08703cda3ea538f5a77a3210780003d6
BLAKE2b-256 c33b3be7605bda68a6bd55620b70419bddb000b4cdfcab8bc633ff1e4c0ed913

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a177b151d8b1dd06a890a700b6e4eb68f2b24d546ff1c54d4c94a253febd72a8
MD5 62d93b3674bcf556afab2f323bec8ae0
BLAKE2b-256 d7ebc13eebd9960dd0dfaa5bdc007b344d4bee3167960504349d8830df98b329

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for colss-0.1.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ac505136f94500b441be713ee7be02c7d8fa66eebd493cce7d2a64551b1f0dbf
MD5 21012b342102c1f654c6b1f669619ca1
BLAKE2b-256 e2b63cb6159acfd9f67788810001fe176f3b844a4a129545f5b486044689c9b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3cd8119af68116d1d710a8b75185fab8d49d6ce2caab18a5c089144ba81d1c42
MD5 71b4fc79b76d47f228e3e7bd751faf54
BLAKE2b-256 75eb29f7fc5419bbd9b429f90d69016ed7fb8682945d9bf8079cf680df00b558

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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.1.7-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

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

File hashes

Hashes for colss-0.1.7-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2797b70fa322678c39cc8687cfc729432e4717bbd1e053a90078cc69bec38daa
MD5 4715b3d7ae7d1a647ea67465a1dd4abc
BLAKE2b-256 4b7e9d168b9827534c661f02a31ce08cfd96128741af4a5da1d5328f32d959cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.7-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