numcodecs_wasm_linear_quantize
Classes:
-
LinearQuantize–Lossy codec to reduce the precision of floating point data.
LinearQuantize
LinearQuantize(bits, dtype, _version='0.1.0')
Lossy codec to reduce the precision of floating point data.
The data is quantized to unsigned integers of the best-fitting type. The range and shape of the input data is stored in-band.
| 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 = 'linear-quantize.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: |
|
|---|