numcodecs_wasm_swizzle_reshape
Classes:
-
SwizzleReshape–Codec to swizzle/swap the axes of an array and reshape it.
SwizzleReshape
SwizzleReshape(axes, _version='1.0.0')
Codec to swizzle/swap the axes of an array and reshape it.
This codec does not store metadata about the original shape of the array. Since axes that have been combined during encoding cannot be split without further information, decoding may fail if an output array is not provided.
Swizzling axes is always supported since no additional information about the array's shape is required to reconstruct it.
| Parameters: |
|
|---|
Methods:
-
decode–Decode the data in
buf. -
encode–Encode the data in
buf. -
from_config–Instantiate the codec from a configuration
dict. -
get_config–Returns the configuration of the codec.
codec_id
class-attribute
instance-attribute
codec_id = 'swizzle-reshape.rs'
decode
decode(buf, out=None)
Decode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|
encode
encode(buf)
Encode the data in buf.
| Parameters: |
|
|---|
| Returns: |
|
|---|
from_config
classmethod
from_config(config)
get_config
get_config()
Returns the configuration of the codec.
numcodecs.registry.get_codec(config)
can be used to reconstruct this codec from the returned config.
| Returns: |
|
|---|