def variety(self, var1):
        return numpy.ma.compressed(numpy.unique(var1)).size
Calculates variety for a given NumPy array.
dataset/ETHPy150Open Esri/solutions-geoprocessing-toolbox/suitability/toolboxes/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/tools/multidimensional_zonal_statistics.py/MultidimensionalZonalStatistics.variety