numcodecs-wasm-round 0.2.0.dev0__py3-none-any.whl → 0.2.0.dev1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- numcodecs_wasm_round/__init__.py +7 -5
- numcodecs_wasm_round/__init__.pyi +90 -0
- numcodecs_wasm_round/codec.wasm +0 -0
- numcodecs_wasm_round/py.typed +0 -0
- {numcodecs_wasm_round-0.2.0.dev0.dist-info → numcodecs_wasm_round-0.2.0.dev1.dist-info}/METADATA +2 -2
- numcodecs_wasm_round-0.2.0.dev1.dist-info/RECORD +8 -0
- numcodecs_wasm_round-0.2.0.dev0.dist-info/RECORD +0 -6
- {numcodecs_wasm_round-0.2.0.dev0.dist-info → numcodecs_wasm_round-0.2.0.dev1.dist-info}/WHEEL +0 -0
- {numcodecs_wasm_round-0.2.0.dev0.dist-info → numcodecs_wasm_round-0.2.0.dev1.dist-info}/top_level.txt +0 -0
numcodecs_wasm_round/__init__.py
CHANGED
@@ -6,8 +6,10 @@ import sys
|
|
6
6
|
from numcodecs_wasm import WasmCodecMeta
|
7
7
|
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
class Round(
|
10
|
+
metaclass=WasmCodecMeta,
|
11
|
+
wasm=importlib.resources.files(
|
12
|
+
sys.modules[__name__]
|
13
|
+
).joinpath("codec.wasm").read_bytes(),
|
14
|
+
):
|
15
|
+
pass
|
@@ -0,0 +1,90 @@
|
|
1
|
+
__all__ = ['Round']
|
2
|
+
|
3
|
+
import numcodecs.abc
|
4
|
+
|
5
|
+
class Round(numcodecs.abc.Codec):
|
6
|
+
r"""
|
7
|
+
Codec that [`round`][numcodecs_wasm_round.round]s the data on encoding and passes through the input
|
8
|
+
unchanged during decoding.
|
9
|
+
|
10
|
+
The codec only supports floating point data.
|
11
|
+
|
12
|
+
Parameters
|
13
|
+
----------
|
14
|
+
precision : ...
|
15
|
+
Precision of the rounding operation
|
16
|
+
"""
|
17
|
+
|
18
|
+
def __init__(self, precision): ...
|
19
|
+
|
20
|
+
codec_id = 'round'
|
21
|
+
|
22
|
+
def decode(self, buf, out=None):
|
23
|
+
r"""
|
24
|
+
Decode the data in `buf`.
|
25
|
+
|
26
|
+
Parameters
|
27
|
+
----------
|
28
|
+
buf : Buffer
|
29
|
+
Encoded data. May be any object supporting the new-style buffer
|
30
|
+
protocol.
|
31
|
+
out : Buffer, optional
|
32
|
+
Writeable buffer to store decoded data. N.B. if provided, this buffer must
|
33
|
+
be exactly the right size to store the decoded data.
|
34
|
+
|
35
|
+
Returns
|
36
|
+
-------
|
37
|
+
dec : Buffer
|
38
|
+
Decoded data. May be any object supporting the new-style
|
39
|
+
buffer protocol.
|
40
|
+
"""
|
41
|
+
...
|
42
|
+
|
43
|
+
def encode(self, buf):
|
44
|
+
r"""
|
45
|
+
Encode the data in `buf`.
|
46
|
+
|
47
|
+
Parameters
|
48
|
+
----------
|
49
|
+
buf : Buffer
|
50
|
+
Data to be encoded. May be any object supporting the new-style
|
51
|
+
buffer protocol.
|
52
|
+
|
53
|
+
Returns
|
54
|
+
-------
|
55
|
+
enc : Buffer
|
56
|
+
Encoded data. May be any object supporting the new-style buffer
|
57
|
+
protocol.
|
58
|
+
"""
|
59
|
+
...
|
60
|
+
|
61
|
+
@staticmethod
|
62
|
+
def from_config(cls, config):
|
63
|
+
r"""
|
64
|
+
Instantiate the codec from a configuration [`dict`][dict].
|
65
|
+
|
66
|
+
Parameters
|
67
|
+
----------
|
68
|
+
config : dict
|
69
|
+
Configuration of the codec.
|
70
|
+
|
71
|
+
Returns
|
72
|
+
-------
|
73
|
+
codec : Self
|
74
|
+
Instantiated codec.
|
75
|
+
"""
|
76
|
+
...
|
77
|
+
|
78
|
+
def get_config(self):
|
79
|
+
r"""
|
80
|
+
Returns the configuration of the codec.
|
81
|
+
|
82
|
+
[`numcodecs.registry.get_codec(config)`][numcodecs.registry.get_codec]
|
83
|
+
can be used to reconstruct this codec from the returned config.
|
84
|
+
|
85
|
+
Returns
|
86
|
+
-------
|
87
|
+
config : dict
|
88
|
+
Configuration of the codec.
|
89
|
+
"""
|
90
|
+
...
|
numcodecs_wasm_round/codec.wasm
CHANGED
Binary file
|
File without changes
|
{numcodecs_wasm_round-0.2.0.dev0.dist-info → numcodecs_wasm_round-0.2.0.dev1.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: numcodecs_wasm_round
|
3
|
-
Version: 0.2.0.
|
3
|
+
Version: 0.2.0.dev1
|
4
4
|
Summary: numcodecs-round compression codec compiled to WebAssembly
|
5
5
|
Author-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
6
6
|
Maintainer-email: Juniper Tyree <juniper.tyree@helsinki.fi>
|
@@ -382,7 +382,7 @@ License: Copyright (c) 2024-2025, Juniper Tyree
|
|
382
382
|
|
383
383
|
Requires-Python: >=3.10
|
384
384
|
Description-Content-Type: text/markdown
|
385
|
-
Requires-Dist: numcodecs-wasm==0.1.0.
|
385
|
+
Requires-Dist: numcodecs-wasm==0.1.0.dev1
|
386
386
|
|
387
387
|
[![CI Status]][workflow]
|
388
388
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
numcodecs_wasm_round/__init__.py,sha256=vapZKweuEchYcBzSgYDTfhYNdcysbPe2daZW_kdzdh8,266
|
2
|
+
numcodecs_wasm_round/__init__.pyi,sha256=8KnYdoMV66T0QMy2-lxiHkEfSJ92pbHZd-CL4vAKI-0,2230
|
3
|
+
numcodecs_wasm_round/codec.wasm,sha256=pH0w06czKv-D-TqxLgWh6aAgjq-_T5v5lmvjyxhILbI,356913
|
4
|
+
numcodecs_wasm_round/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
numcodecs_wasm_round-0.2.0.dev1.dist-info/METADATA,sha256=etWzq6M0paHCzcZEqf0MXL3pURAIifbj6rDVn97irXU,21091
|
6
|
+
numcodecs_wasm_round-0.2.0.dev1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
+
numcodecs_wasm_round-0.2.0.dev1.dist-info/top_level.txt,sha256=kMhjVd2bZo8-ZJnrDpbCLeFBgQSxbiqsow_cOTW5JYk,21
|
8
|
+
numcodecs_wasm_round-0.2.0.dev1.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
numcodecs_wasm_round/__init__.py,sha256=h6xal3zgoVjdR-jZjF15Ob6mgj04K3ABGtVriLbyzNg,290
|
2
|
-
numcodecs_wasm_round/codec.wasm,sha256=aDlgi_RW4Ne5d8ai24fc0JqAVPq22lnH92Uvl7OQTSs,356902
|
3
|
-
numcodecs_wasm_round-0.2.0.dev0.dist-info/METADATA,sha256=UVK1wQgRd-hklsJ1Xagzn9QbfHYaImG874ZtCs1-1tU,21091
|
4
|
-
numcodecs_wasm_round-0.2.0.dev0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
5
|
-
numcodecs_wasm_round-0.2.0.dev0.dist-info/top_level.txt,sha256=kMhjVd2bZo8-ZJnrDpbCLeFBgQSxbiqsow_cOTW5JYk,21
|
6
|
-
numcodecs_wasm_round-0.2.0.dev0.dist-info/RECORD,,
|
{numcodecs_wasm_round-0.2.0.dev0.dist-info → numcodecs_wasm_round-0.2.0.dev1.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|