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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pySTLtools-0.0.1.tar.gz.
File metadata
- Download URL: pySTLtools-0.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36ae99998ebd8b40e9bbc53d2590c5b8b118106929949984a602467404a9c6b
|
|
| MD5 |
68e6539df0bc1e01d49e0555beb4d81c
|
|
| BLAKE2b-256 |
6eaebe06ca8051d3d18a4f1ea7b5f621e0151158cd2b5b65d9386078e9e52114
|
File details
Details for the file pySTLtools-0.0.1-py2-none-any.whl.
File metadata
- Download URL: pySTLtools-0.0.1-py2-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b90ead908176582366c3571f6ca5c44c3897c3fa692b42e81a75496c529e072a
|
|
| MD5 |
c1dab683dd815f5034ecca0d5012173e
|
|
| BLAKE2b-256 |
e9e9126a9ceb25e0f1da0cb87780dd6377659df35d8905bf55ce525a17af761c
|