This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numba | |
import numpy as np | |
@numba.jit | |
def gini(x, w=None): | |
# from https://stackoverflow.com/questions/48999542/more-efficient-weighted-gini-coefficient-in-python | |
# The rest of the code requires numpy arrays. | |
# x = np.asarray(x) | |
if w is not None: | |
# w = np.asarray(w) |