in data_measurements/zipf/zipf.py [0:0]
def _set_xmax(self):
"""
xmax is usually None, so we add some handling to set it as the
maximum rank in the dataset.
:param xmax:
:return:
"""
if self.xmax is not None:
self.xmax = int(xmax)
elif self.word_counts_unique:
self.xmax = int(len(self.word_counts_unique))
elif self.word_ranks_unique:
self.xmax = int(len(self.word_ranks_unique))