Skip to main content

This library help in getting a "average value of numbers list" and "get median (for ordered, unordered list of numbers and even or odd list values)". Enjoy.

Project description

This library help in getting a "average value of numbers list" and "get median (for ordered, unordered list of numbers and even or odd list values)".

Enjoy.

Github rep - https://github.com/zelenchuk/avemedi_lib

Installing

pip install avemedi_lib

Usage

from avemedi_lib.functions import average, get_median, get_median_custom

test_even_array = [12, 32, 23, 43, 14, 44, 123, 15]
test_odd_array = [1, 2, 3, 4, 5, 6, 7, 8, 9]


# Getting average value of list items
print(average(test_even_array))  # 38.25

# Getting median value for ordered or unordered numbers list
print(get_median(test_even_array))  # 27.5
print(get_median(test_odd_array))  # 27.5

# You can use your own sorted and your count functions
a = sorted(test_even_array)
n = len(a)

print(get_median_custom(a, n))  # 27.5

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

avemedi_lib-0.1.6-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

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