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
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
Built Distribution
Hashes for pySTLtools-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b90ead908176582366c3571f6ca5c44c3897c3fa692b42e81a75496c529e072a |
|
MD5 | c1dab683dd815f5034ecca0d5012173e |
|
BLAKE2b-256 | e9e9126a9ceb25e0f1da0cb87780dd6377659df35d8905bf55ce525a17af761c |