Shuffle#
- class numcodecs.shuffle.Shuffle(elementsize=4)[source]#
Codec providing shuffle
- Parameters:
- elementsizeint
Size in bytes of the array elements. Default = 4
- codec_id: str | None = 'shuffle'#
Codec identifier.
- encode(buf, out=None)[source]#
Encode data in buf.
- Parameters:
- bufbuffer-like
Data to be encoded. May be any object supporting the new-style buffer protocol.
- Returns:
- encbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- decode(buf, out=None)[source]#
Decode data in buf.
- Parameters:
- bufbuffer-like
Encoded data. May be any object supporting the new-style buffer protocol.
- outbuffer-like, optional
Writeable buffer to store decoded data. N.B. if provided, this buffer must be exactly the right size to store the decoded data.
- Returns:
- decbuffer-like
Decoded data. May be any object supporting the new-style buffer protocol.