SegmentedOperand#
- class cuequivariance.SegmentedOperand#
A segmented operand is a list of segment’s shapes.
- __init__(segments=None, *, ndim=None, _dims=None)#
- classmethod empty_segments(num_segments)#
Create an operand with ndim=0
- Parameters:
num_segments (int)
- Return type:
- classmethod stack(operands)#
Stack a list of operands together.
- Parameters:
operands (list[SegmentedOperand])
- Return type:
- copy()#
Copy the operand.
- Return type:
- assert_valid()#
Assert that the operand is valid.
- insert_segment(index, segment)#
Insert a segment at a given index.
- add_segment(segment)#
Add a segment to the operand.
- get_dimensions_dict()#
Return a dictionary of dimensions for each channel.
- all_same_segment_shape()#
Check if all segments have the same shape. Returns False if there are no segments.
- Return type:
- property slice_by_segment: _SegmentSlicer#
Return a slicer that allows slicing by segment index.
- property slice_by_size: _SizeSlicer#
Return a slicer that allows slicing by flat size/offset.