Skip to main content

Compute the Gini index.

Project description

pygini

Very simple module that computes the Gini index of a numpy array.

Installation

pip install pygini

Usage

import numpy as np
from pygini import gini

RG = np.random.default_rng(0)
A = RG.random(100)
GI = gini(A)

# Also compute along axis
A = RG.random((100, 80, 80))
GI = gini(A, axis=0)

# GI.shape = (80, 80)

See examples directory.

Project details


Download files

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

Source Distribution

pygini-1.0.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

pygini-1.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file pygini-1.0.0.tar.gz.

File metadata

  • Download URL: pygini-1.0.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.6.9

File hashes

Hashes for pygini-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fb9ed53d80b19f3c66343147faef50b8ff2f9051b16524f13163084642127782
MD5 beb75b91591cbd425425c008d4b4ce47
BLAKE2b-256 b6717ad5687df32e3a605dca532fbcbe76602e3d30bec60911460544e9f7c1a0

See more details on using hashes here.

File details

Details for the file pygini-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pygini-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.6.9

File hashes

Hashes for pygini-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f111790d0e10c4d54ae47e13c8bec7f9033b2da896cfebdf2cbfede53283ce3d
MD5 f1df5ee7bab55809bf8dd116ad03c0bd
BLAKE2b-256 2c452144f96f3f078eb9fae040464c21d352b7f4ac487f215859523140b26c8d

See more details on using hashes here.

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