categorical_ndarray#

class glue.utils.array.categorical_ndarray(value, dtype=None, copy=True, order=None, subok=False, ndmin=0, categories=None)[source]#

Bases: ndarray

A Numpy array subclass that includes properties to find the categories and unique integer codes for array values.

Attributes Summary

categories

codes

Methods Summary

jitter([method])

Jitter the codes.

Attributes Documentation

categories[source]#
codes[source]#

Methods Documentation

jitter(method=None)[source]#

Jitter the codes.

Parameters:
method{None, ‘uniform’}

If None, not jittering is done (or any jittering is undone). If 'uniform', the codes are randomized by a uniformly distributed random variable.