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
Release history Release notifications | RSS feed
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)
Built Distribution
pygini-1.0.0-py3-none-any.whl
(14.7 kB
view details)
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb9ed53d80b19f3c66343147faef50b8ff2f9051b16524f13163084642127782 |
|
MD5 | beb75b91591cbd425425c008d4b4ce47 |
|
BLAKE2b-256 | b6717ad5687df32e3a605dca532fbcbe76602e3d30bec60911460544e9f7c1a0 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f111790d0e10c4d54ae47e13c8bec7f9033b2da896cfebdf2cbfede53283ce3d |
|
MD5 | f1df5ee7bab55809bf8dd116ad03c0bd |
|
BLAKE2b-256 | 2c452144f96f3f078eb9fae040464c21d352b7f4ac487f215859523140b26c8d |