Compute Gini Impurity for a Split | TensorTonic