- class graphicle.data.ColorArray(graphicle.base.ArrayBase)[source]
Returns data structure of color / anti-color pairs for particle shower.
New in version 0.1.0.
Changed in version 0.2.0: Added internal numpy interfaces for greater interoperability.
Changed in version 0.3.4: Added
colorandanticolorattributes.- Parameters:¶
- data : ndarray[int32] or ndarray[void]
Data representing the QCD color charge of each particle in the point cloud. Given as either a (n, 2)-dimensional
numpyarray, or a structured array, with field names('color', 'anticolor').
Public members¶
- __iter__() Iterator[ColorElement][source]
Iterator exposing contained data as Python native.
- property data : ndarray[Any, dtype[void]][source]
Structured array containing
('color', 'anticolor')values for particle set.
- property anticolor : ndarray[Any, dtype[int32]][source]
Anticolor component of the color / anticolor codes.
- copy() ColorArray[source]
Copies the underlying data into a new ColorArray instance.
- serialize() tuple[ColorElement, ...][source]
Provides a serialized version of the underlying data.
- __setattr__(name, val)[source]
Method generated by attrs for class ColorArray.
- ColorArray(...)[source]
Method generated by attrs for class ColorArray.
- index(value, ...) integer -- return first index of value.[source]
Raises ValueError if the value is not present.
- classmethod __subclasshook__(C)[source]
Abstract classes can override this to customize issubclass().
-
ColorArray =
<bound method GenericAlias of <class 'collections.abc.Iterable'>>[source]
Last update:
Jun 27, 2025