Unique

class grizli.utils.Unique(array, verbose=True)[source]

Bases: object

Helper for unique items in an array

Parameters:
array : array-like

Data to parse, generally strings but can be anything that can be parsed by numpy.unique

Attributes:
dim : int

size of input array

values : list

Unique elements of array

indices : list

Integer list length of array with the indices of values for each element

counts : list

Counts of each element of values

Methods

__get__(key) Return a bool array where entries of array match the specified key
__iter__ Iterator over values

Attributes Summary

N Number of unique values

Methods Summary

count(key) Get occurrences count of a particular value
info([sort_counts]) Print a summary

Attributes Documentation

N

Number of unique values

Methods Documentation

count(key)[source]

Get occurrences count of a particular value

info(sort_counts=-1)[source]

Print a summary