Skip to main content

A Python package for mathematical tools like in STL of C++

Project description

pySTLtools

pySTLtools is a Python package with mathematical tools that could come handy. Aimed at becoming an equivalent to STL in C++.

Installation

Run the following to install:

pip install pySTLtools

Usage

Currently has 3 functions. One for returning primes until a given limit using Sieve of Atkin. Another for counting number of setbits in binary representation of an integer. And the other is for checking if a bit is set in the binary representation of an integer.

pySTLtools.primes_till_(15)

Output: [2, 3, 5, 7, 11, 13]

pySTLtools.is_bit_set(7,1)

Output: True

pySTLtools.count_set_bits(9)

Output: 2

Developing pySTL

Contributions/Collaborations to/on this project are very welcomed! Any small help is appreciated :) I belive the tools that could be developed on this project could be endless

Project details


Download files

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

Source Distribution

pySTLtools-0.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

pySTLtools-0.0.1-py2-none-any.whl (3.2 kB view hashes)

Uploaded Python 2

Supported by

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