Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rcolistete/MicroPython_Statistics
Statistics module for MicroPython
https://github.com/rcolistete/MicroPython_Statistics
Last synced: 3 months ago
JSON representation
Statistics module for MicroPython
- Host: GitHub
- URL: https://github.com/rcolistete/MicroPython_Statistics
- Owner: rcolistete
- License: mit
- Created: 2018-10-18T20:04:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-26T16:29:52.000Z (about 6 years ago)
- Last Synced: 2024-04-22T12:35:16.428Z (7 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 13
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - MicroPython_Statistics - Statistics module for MicroPython. (Libraries / Mathematics)
README
# MicroPython Statistics module
Statistics module for MicroPython, based on statistics module for Python 3 (>= 3.4) :
- [documentation of Python 3 statistics module](https://docs.python.org/3/library/statistics.html)
- [PEP 0450 about Python 3 statistics module](https://www.python.org/dev/peps/pep-0450/)
- [source code of Python 3 statistics module](https://github.com/python/cpython/blob/3.7/Lib/statistics.py)All Python 3 statistics functions are implemented on MicroPython version, with the same syntax :
| Function | Description |
| -------- | ----------- |
| mean() | Arithmetic mean (“average”) of data |
| harmonic_mean() | Harmonic mean of data |
| median() | Median (middle value) of data |
| median_low() | Low median of data |
| median_high() | High median of data |
| median_grouped() | Median, or 50th percentile, of grouped data |
| mode() | Mode (most common value) of discrete data |
| pstdev() | Population standard deviation of data |
| pvariance() | Population variance of data |
| stdev() | Sample standard deviation of data |
| variance() | Sample variance of data |The MicroPython version of statistics module has some limitations :
- less precision on mean due to the lack of fraction numbers and 'float.as_integer_ratio()' on MicroPython;
- Fraction (from fraction module) and Decimal (from decimal module) are not accepted numbers because the fraction and decimal modules are not implemented on MicroPython;
- no error messages;
- no documentation and examples for each function inside the module.Many MicroPython modules are optimised to save RAM memory because many microcontrollers only have tens of KBytes.