numcodecs_wasm_asinh
Classes:
-
Asinh–Asinh codec, which applies a quasi-logarithmic transformation on encoding.
Asinh
Asinh(linear_width, _version='1.0.0')
Asinh codec, which applies a quasi-logarithmic transformation on encoding.
For values close to zero that are within the codec's linear_width, the
transform is close to linear. For values of larger magnitudes, the
transform is asymptotically logarithmic. Unlike a logarithmic transform,
this codec supports all finite values, including negative values and zero.
In detail, the codec calculates
\(c = w \cdot \text{asinh}\left( \frac{x}{w} \right)\)
on encoding and
\(d = w \cdot \text{sinh}\left( \frac{c}{w} \right)\)
on decoding, where \(w\) is the codec's linear_width.
The codec only supports finite floating point numbers.
| 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 = 'asinh.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: |
|
|---|