Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Interquartile Mean pure-Python module

Project Description


Interquartile Mean pure-Python module. It contains two classes:

  1. DictIQM
  2. MovingIQM


This class is efficient for datasets in which many numbers are repeated. It should not be used for large datasets with a uniform distribution. The trade-off between accuracy and memory usage can be manged with its round_digits argument.


from iqm import DictIQM
import sys

diqm = DictIQM(round_digits=-1, tenth_precise=True)
for line in open("source1_numbers_list.txt", "r"):
    diqm("source1", line)

print "# {:12,.2f}    Dict IQM".format("source1"))


This class sacrifices accuracy for speed and low memory usage.


from iqm import MovingIQM
import sys

miqm = MovingIQM(1000)
for line in open("source1_numbers_list.txt", "r"):
    miqm("source1", line)

print "# {:12,.2f}    Moving IQM".format("source1"))


See LICENSE.txt (MIT License).

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(4.4 kB) Copy SHA256 Hash SHA256
Source Oct 18, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting