dcnum 0.25.9__py3-none-any.whl → 0.25.10__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.
Potentially problematic release.
This version of dcnum might be problematic. Click here for more details.
- dcnum/_version.py +2 -2
- dcnum/segm/segm_torch/segm_torch_base.py +11 -4
- {dcnum-0.25.9.dist-info → dcnum-0.25.10.dist-info}/METADATA +1 -1
- {dcnum-0.25.9.dist-info → dcnum-0.25.10.dist-info}/RECORD +7 -7
- {dcnum-0.25.9.dist-info → dcnum-0.25.10.dist-info}/WHEEL +1 -1
- {dcnum-0.25.9.dist-info → dcnum-0.25.10.dist-info}/licenses/LICENSE +0 -0
- {dcnum-0.25.9.dist-info → dcnum-0.25.10.dist-info}/top_level.txt +0 -0
dcnum/_version.py
CHANGED
|
@@ -3,6 +3,8 @@ import pathlib
|
|
|
3
3
|
import re
|
|
4
4
|
from typing import Dict
|
|
5
5
|
|
|
6
|
+
import numpy as np
|
|
7
|
+
|
|
6
8
|
from ...meta import paths
|
|
7
9
|
|
|
8
10
|
from ..segmenter import Segmenter, SegmenterNotApplicableError
|
|
@@ -116,10 +118,15 @@ class TorchSegmenterBase(Segmenter):
|
|
|
116
118
|
"""
|
|
117
119
|
key = item["key"]
|
|
118
120
|
if key in data_dict:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
valid = True
|
|
122
|
+
if "regexp" in item:
|
|
123
|
+
re_match = bool(re.search(item["regexp"], data_dict[key],
|
|
124
|
+
re.MULTILINE))
|
|
125
|
+
negate = item.get("regexp-negate", False)
|
|
126
|
+
valid = valid and (re_match if not negate else not re_match)
|
|
127
|
+
if "value" in item:
|
|
128
|
+
valid = valid and np.allclose(item["value"], data_dict[key],
|
|
129
|
+
atol=0, rtol=0.01)
|
|
123
130
|
if not valid:
|
|
124
131
|
reasons_list.append(item.get("reason", "unknown reason"))
|
|
125
132
|
elif not item.get("allow-missing-key", False):
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
dcnum/__init__.py,sha256=p0mYg01FQ6nsERYmx_FfVxqqHvYcSMEyIAMBIivAmO8,1206
|
|
2
|
-
dcnum/_version.py,sha256=
|
|
2
|
+
dcnum/_version.py,sha256=2u4bWaMdcZXyf4_yxgykEAXNXcEaVQumowHKcuxLJUI,515
|
|
3
3
|
dcnum/os_env_st.py,sha256=4psq-gPuWTTQ118kCiTx0Mhoyads4Irn6JSUzZk8gyc,3052
|
|
4
4
|
dcnum/feat/__init__.py,sha256=jUJYWTD3VIoDNKrmryXbjHb1rGwYtK4b7VPWihYgUoo,325
|
|
5
5
|
dcnum/feat/event_extractor_manager_thread.py,sha256=6D3RVYBuH7gOoGZ4Kz74n6fhq7MtlTY26kpSwZRqg3M,7972
|
|
@@ -41,7 +41,7 @@ dcnum/segm/segmenter_manager_thread.py,sha256=vMZFBa18oO8OyVB3niy_mtEfKkGOWHEga4
|
|
|
41
41
|
dcnum/segm/segmenter_mpo.py,sha256=O6G4xzHKNMSmyX9HDXTfl-3f9Fk2filxvVrRIO2D9hg,14117
|
|
42
42
|
dcnum/segm/segmenter_sto.py,sha256=C55orEAZtMowNwtAT_WdSv46n5CzgLFuGq9kwdHc97I,3963
|
|
43
43
|
dcnum/segm/segm_torch/__init__.py,sha256=DtUqJTbj7ybrTbXlwHq1Y4SCzi22rMW9Cus6wX-iU-A,822
|
|
44
|
-
dcnum/segm/segm_torch/segm_torch_base.py,sha256=
|
|
44
|
+
dcnum/segm/segm_torch/segm_torch_base.py,sha256=wPt5QAmBDQxAA3Zxrdj3l9di0nIQmlUmKVJWtEpahH8,4814
|
|
45
45
|
dcnum/segm/segm_torch/segm_torch_mpo.py,sha256=GOva6o-6_SppxWD4BeBB3ap1TR-6rIYHavtfIstaYvc,2643
|
|
46
46
|
dcnum/segm/segm_torch/segm_torch_sto.py,sha256=PTOJrP_FkaxZZul8lM4VA2HL3KyxrheDDWWdJbmJdiw,3393
|
|
47
47
|
dcnum/segm/segm_torch/torch_model.py,sha256=5aL6SwSvg1N2gATEGBhP3aA4WTHlvGzQVYuizmh0LrU,3187
|
|
@@ -51,8 +51,8 @@ dcnum/write/__init__.py,sha256=sK79IlvCFIqf2oFABVeyYedMnHOsEIQpxAauEeNO-Tw,273
|
|
|
51
51
|
dcnum/write/deque_writer_thread.py,sha256=ao7F1yrVKyufgC4rC0Y2_Vt7snuT6KpI7W2qVxcjdhk,1994
|
|
52
52
|
dcnum/write/queue_collector_thread.py,sha256=-p5vrk9cDhtaIMFIu_cCmvlZJafrFkW68uONonMURYo,11617
|
|
53
53
|
dcnum/write/writer.py,sha256=JkVb4KDBV3oo9r3p2yy9wECO1REx7FG0PRBmVWTxJdk,20577
|
|
54
|
-
dcnum-0.25.
|
|
55
|
-
dcnum-0.25.
|
|
56
|
-
dcnum-0.25.
|
|
57
|
-
dcnum-0.25.
|
|
58
|
-
dcnum-0.25.
|
|
54
|
+
dcnum-0.25.10.dist-info/licenses/LICENSE,sha256=rX7tNSxP-EhLz-yYUyoBGwjJheA2fiZpT1Iw0LXnJ2M,1069
|
|
55
|
+
dcnum-0.25.10.dist-info/METADATA,sha256=twT_YXAb4Xxt24EKrjxEg8-4UgkHDHYOfzS-prFCXTM,2355
|
|
56
|
+
dcnum-0.25.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
57
|
+
dcnum-0.25.10.dist-info/top_level.txt,sha256=Hmh38rgG_MFTVDpUDGuO2HWTSq80P585Het4COQzFTg,6
|
|
58
|
+
dcnum-0.25.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|