Skip to content

avsg8/MicroPython_Statistics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython Statistics module

Statistics module for MicroPython, based on statistics module for Python 3 (>= 3.4) :

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.

About

Statistics module for MicroPython

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%