datastock 0.0.30__py3-none-any.whl → 0.0.32__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.
- datastock/_class1_check.py +13 -12
- datastock/_class3.py +8 -0
- datastock/_plot_BvsA_as_distribution.py +2 -1
- datastock/_plot_as_array.py +53 -11
- datastock/_plot_as_mobile_lines.py +2 -1
- datastock/_plot_as_profile1d.py +2 -1
- datastock/version.py +1 -1
- {datastock-0.0.30.dist-info → datastock-0.0.32.dist-info}/METADATA +1 -1
- {datastock-0.0.30.dist-info → datastock-0.0.32.dist-info}/RECORD +12 -12
- {datastock-0.0.30.dist-info → datastock-0.0.32.dist-info}/WHEEL +1 -1
- {datastock-0.0.30.dist-info → datastock-0.0.32.dist-info}/LICENSE +0 -0
- {datastock-0.0.30.dist-info → datastock-0.0.32.dist-info}/top_level.txt +0 -0
datastock/_class1_check.py
CHANGED
@@ -590,14 +590,14 @@ def _check_dref(
|
|
590
590
|
isinstance(v0, dict)
|
591
591
|
and (
|
592
592
|
isinstance(v0.get('data'), (np.ndarray, list, tuple))
|
593
|
-
or isinstance(v0.get('size'), (int, np.
|
593
|
+
or isinstance(v0.get('size'), (int, np.integer))
|
594
594
|
)
|
595
595
|
)
|
596
596
|
if not c0:
|
597
597
|
msg = "v0 must be a dict with either 'data' or 'size'"
|
598
598
|
raise Exception(msg)
|
599
599
|
|
600
|
-
if isinstance(v0.get('size'), (int, np.
|
600
|
+
if isinstance(v0.get('size'), (int, np.integer)):
|
601
601
|
dref[k0]['size'] = int(v0['size'])
|
602
602
|
|
603
603
|
dref2[key] = dict(dref[k0])
|
@@ -1553,9 +1553,9 @@ def _set_param(
|
|
1553
1553
|
# Set value
|
1554
1554
|
|
1555
1555
|
# Check value - TBC: allow list
|
1556
|
-
ltypes =
|
1556
|
+
ltypes = (int, np.integer, float, str, tuple)
|
1557
1557
|
lc = [
|
1558
|
-
isinstance(value,
|
1558
|
+
isinstance(value, ltypes),
|
1559
1559
|
isinstance(value, (list, tuple, np.ndarray))
|
1560
1560
|
and distribute is False,
|
1561
1561
|
isinstance(value, (list, tuple, np.ndarray))
|
@@ -1569,15 +1569,15 @@ def _set_param(
|
|
1569
1569
|
]
|
1570
1570
|
if not (value is None or any(lc)):
|
1571
1571
|
msg = (
|
1572
|
-
"""
|
1572
|
+
f"""
|
1573
1573
|
Accepted types for value include:
|
1574
1574
|
- None
|
1575
|
-
- {}: common to all
|
1575
|
+
- {ltypes}: common to all
|
1576
1576
|
- list, np.ndarray: key by key
|
1577
1577
|
- dict of scalar / str
|
1578
1578
|
|
1579
|
-
The length of value must match the selected keys ({})
|
1580
|
-
"""
|
1579
|
+
The length of value must match the selected keys ({len(key)})
|
1580
|
+
"""
|
1581
1581
|
)
|
1582
1582
|
raise Exception(msg)
|
1583
1583
|
|
@@ -1690,7 +1690,7 @@ def _ind_tofrom_key(
|
|
1690
1690
|
and (
|
1691
1691
|
(ind.dtype == np.bool and ind.size == len(dd))
|
1692
1692
|
or (
|
1693
|
-
ind.dtype ==
|
1693
|
+
ind.dtype == int
|
1694
1694
|
and np.all(np.isfinite(ind))
|
1695
1695
|
and np.max(ind) <= len(dd)
|
1696
1696
|
)
|
@@ -1798,10 +1798,11 @@ def _select(dd=None, dd_name=None, log=None, returnas=None, **kwdargs):
|
|
1798
1798
|
# Get raw bool indices
|
1799
1799
|
|
1800
1800
|
# Get list of accessible param
|
1801
|
-
ltypes = (
|
1801
|
+
ltypes = (float, int, np.integer)
|
1802
1802
|
lquant = [
|
1803
1803
|
kk for kk in kwdargs.keys()
|
1804
|
-
if any([isinstance(dd[k0][kk], ltypes) for k0 in dd.keys()
|
1804
|
+
if any([isinstance(dd[k0][kk], ltypes) for k0 in dd.keys()
|
1805
|
+
])
|
1805
1806
|
]
|
1806
1807
|
|
1807
1808
|
# Prepare array of bool indices and populate
|
@@ -1973,7 +1974,7 @@ def _show_extract(dobj=None, lk=None):
|
|
1973
1974
|
if isinstance(v0, float):
|
1974
1975
|
lv0.append(f'{v0:.2e}')
|
1975
1976
|
elif isinstance(v0, np.ndarray) and v0.size == 3:
|
1976
|
-
if v0.dtype ==
|
1977
|
+
if v0.dtype == float:
|
1977
1978
|
lv0.append(
|
1978
1979
|
np.array2string(
|
1979
1980
|
v0,
|
datastock/_class3.py
CHANGED
@@ -38,6 +38,7 @@ class DataStock3(DataStock2):
|
|
38
38
|
inverty=None,
|
39
39
|
bck=None,
|
40
40
|
interp=None,
|
41
|
+
show_commands=None,
|
41
42
|
# figure-specific
|
42
43
|
dax=None,
|
43
44
|
dmargin=None,
|
@@ -72,6 +73,7 @@ class DataStock3(DataStock2):
|
|
72
73
|
inverty=inverty,
|
73
74
|
bck=bck,
|
74
75
|
interp=interp,
|
76
|
+
show_commands=show_commands,
|
75
77
|
# figure-specific
|
76
78
|
dax=dax,
|
77
79
|
dmargin=dmargin,
|
@@ -102,6 +104,7 @@ class DataStock3(DataStock2):
|
|
102
104
|
rotation=None,
|
103
105
|
inverty=None,
|
104
106
|
bck=None,
|
107
|
+
show_commands=None,
|
105
108
|
# figure-specific
|
106
109
|
dax=None,
|
107
110
|
dmargin=None,
|
@@ -131,6 +134,7 @@ class DataStock3(DataStock2):
|
|
131
134
|
rotation=rotation,
|
132
135
|
inverty=inverty,
|
133
136
|
bck=bck,
|
137
|
+
show_commands=show_commands,
|
134
138
|
# figure-specific
|
135
139
|
dax=dax,
|
136
140
|
dmargin=dmargin,
|
@@ -158,6 +162,7 @@ class DataStock3(DataStock2):
|
|
158
162
|
lkeys=None,
|
159
163
|
bstr_dict=None,
|
160
164
|
rotation=None,
|
165
|
+
show_commands=None,
|
161
166
|
# figure-specific
|
162
167
|
dax=None,
|
163
168
|
dmargin=None,
|
@@ -185,6 +190,7 @@ class DataStock3(DataStock2):
|
|
185
190
|
lkeys=lkeys,
|
186
191
|
bstr_dict=bstr_dict,
|
187
192
|
rotation=rotation,
|
193
|
+
show_commands=show_commands,
|
188
194
|
# figure-specific
|
189
195
|
dax=dax,
|
190
196
|
dmargin=dmargin,
|
@@ -247,6 +253,7 @@ class DataStock3(DataStock2):
|
|
247
253
|
keyB=None,
|
248
254
|
keyX=None,
|
249
255
|
axis=None,
|
256
|
+
show_commands=None,
|
250
257
|
# customization of scatter plot
|
251
258
|
dlim=None,
|
252
259
|
color_dict=None,
|
@@ -289,6 +296,7 @@ class DataStock3(DataStock2):
|
|
289
296
|
keyB=keyB,
|
290
297
|
keyX=keyX,
|
291
298
|
axis=axis,
|
299
|
+
show_commands=show_commands,
|
292
300
|
# customization of scatter plot
|
293
301
|
dlim=dlim,
|
294
302
|
color_dict=color_dict,
|
@@ -37,6 +37,7 @@ def plot_BvsA_as_distribution(
|
|
37
37
|
keyB=None,
|
38
38
|
keyX=None,
|
39
39
|
axis=None,
|
40
|
+
show_commands=None,
|
40
41
|
# customization of scatter plot
|
41
42
|
dlim=None,
|
42
43
|
dlim_logic=None,
|
@@ -471,7 +472,7 @@ def plot_BvsA_as_distribution(
|
|
471
472
|
coll2.disconnect_old()
|
472
473
|
coll2.connect()
|
473
474
|
|
474
|
-
coll2.show_commands()
|
475
|
+
coll2.show_commands(verb=show_commands)
|
475
476
|
return coll2
|
476
477
|
else:
|
477
478
|
return coll2, dgroup
|
datastock/_plot_as_array.py
CHANGED
@@ -65,6 +65,7 @@ def plot_as_array(
|
|
65
65
|
inverty=None,
|
66
66
|
bck=None,
|
67
67
|
interp=None,
|
68
|
+
show_commands=None,
|
68
69
|
# figure-specific
|
69
70
|
dax=None,
|
70
71
|
dmargin=None,
|
@@ -324,7 +325,7 @@ def plot_as_array(
|
|
324
325
|
coll2.disconnect_old()
|
325
326
|
coll2.connect()
|
326
327
|
|
327
|
-
coll2.show_commands()
|
328
|
+
coll2.show_commands(verb=show_commands)
|
328
329
|
return coll2
|
329
330
|
else:
|
330
331
|
return coll2, dgroup
|
@@ -412,10 +413,18 @@ def _check_keyXYZ(
|
|
412
413
|
or _check_uniform_log(k0=k0, ddata=coll._ddata)
|
413
414
|
]
|
414
415
|
|
415
|
-
|
416
|
-
keyX
|
417
|
-
|
418
|
-
|
416
|
+
try:
|
417
|
+
keyX = _generic_check._check_var(
|
418
|
+
keyX, keyXstr,
|
419
|
+
allowed=lok,
|
420
|
+
)
|
421
|
+
except Exception as err:
|
422
|
+
msg = (
|
423
|
+
err.args[0]
|
424
|
+
+ f"\nContraint on uniformity: {uniform}"
|
425
|
+
)
|
426
|
+
err.args = (msg,)
|
427
|
+
raise err
|
419
428
|
|
420
429
|
refX = coll._ddata[keyX]['ref'][0]
|
421
430
|
|
@@ -425,6 +434,22 @@ def _check_keyXYZ(
|
|
425
434
|
elif keyX in refs:
|
426
435
|
keyX, refX = 'index', keyX
|
427
436
|
|
437
|
+
elif keyX == 'index':
|
438
|
+
if already is None:
|
439
|
+
refX = refs[dim_min - 1]
|
440
|
+
elif all([kk in already for kk in refs]): # TBC
|
441
|
+
# sameref
|
442
|
+
refX = refs[dim_min - 1]
|
443
|
+
msg = (
|
444
|
+
"Special case\n"
|
445
|
+
"\t- refs: {refs}\n"
|
446
|
+
f"\t- '{keyXstr}': {keyX}\n"
|
447
|
+
f"\t- already: {already}"
|
448
|
+
)
|
449
|
+
raise Exception(msg)
|
450
|
+
else:
|
451
|
+
refX = [kk for kk in refs if kk not in already][0]
|
452
|
+
|
428
453
|
else:
|
429
454
|
msg = (
|
430
455
|
f"Arg '{keyXstr}' refers to unknow data:\n"
|
@@ -1132,8 +1157,13 @@ def plot_as_array_2d(
|
|
1132
1157
|
ax2.set_ylabel('data')
|
1133
1158
|
ax2.set_xlabel(labX)
|
1134
1159
|
|
1135
|
-
|
1136
|
-
|
1160
|
+
if np.isfinite(ymin):
|
1161
|
+
ax1.set_xlim(left=ymin)
|
1162
|
+
ax2.set_ylim(bottom=ymin)
|
1163
|
+
if np.isfinite(ymax):
|
1164
|
+
ax1.set_xlim(right=ymax)
|
1165
|
+
ax2.set_ylim(top=ymax)
|
1166
|
+
|
1137
1167
|
|
1138
1168
|
# axes for text
|
1139
1169
|
ax3 = fig.add_subplot(gs[:3, 3], frameon=False)
|
@@ -2065,7 +2095,10 @@ def _plot_as_array_3d_label_axes(
|
|
2065
2095
|
ax.yaxis.set_label_position('right')
|
2066
2096
|
ax.xaxis.set_label_position('top')
|
2067
2097
|
|
2068
|
-
|
2098
|
+
if np.isfinite(ymin):
|
2099
|
+
ax.set_xlim(left=ymin)
|
2100
|
+
if np.isfinite(ymax):
|
2101
|
+
ax.set_xlim(right=ymax)
|
2069
2102
|
|
2070
2103
|
# y text ticks
|
2071
2104
|
if ystr:
|
@@ -2090,7 +2123,10 @@ def _plot_as_array_3d_label_axes(
|
|
2090
2123
|
ax.set_ylabel('data')
|
2091
2124
|
ax.set_xlabel(labX)
|
2092
2125
|
|
2093
|
-
|
2126
|
+
if np.isfinite(ymin):
|
2127
|
+
ax.set_ylim(bottom=ymin)
|
2128
|
+
if np.isfinite(ymax):
|
2129
|
+
ax.set_ylim(top=ymax)
|
2094
2130
|
|
2095
2131
|
# x text ticks
|
2096
2132
|
if xstr:
|
@@ -2113,7 +2149,10 @@ def _plot_as_array_3d_label_axes(
|
|
2113
2149
|
ax.set_ylabel('data')
|
2114
2150
|
ax.set_xlabel(labZ)
|
2115
2151
|
|
2116
|
-
|
2152
|
+
if np.isfinite(ymin):
|
2153
|
+
ax.set_ylim(bottom=ymin)
|
2154
|
+
if np.isfinite(ymax):
|
2155
|
+
ax.set_ylim(top=ymax)
|
2117
2156
|
|
2118
2157
|
# z text ticks
|
2119
2158
|
if zstr:
|
@@ -2901,7 +2940,10 @@ def _plot_as_array_4d_label_axes(
|
|
2901
2940
|
ax.yaxis.set_label_position('right')
|
2902
2941
|
ax.xaxis.set_label_position('top')
|
2903
2942
|
|
2904
|
-
|
2943
|
+
if np.isfinite(ymin):
|
2944
|
+
ax.set_xlim(left=ymin)
|
2945
|
+
if np.isfinite(ymax):
|
2946
|
+
ax.set_xlim(right=ymax)
|
2905
2947
|
|
2906
2948
|
# y text ticks
|
2907
2949
|
if ystr:
|
@@ -58,6 +58,7 @@ def plot_as_mobile_lines(
|
|
58
58
|
lkeys=None,
|
59
59
|
bstr_dict=None,
|
60
60
|
rotation=None,
|
61
|
+
show_commands=None,
|
61
62
|
# figure-specific
|
62
63
|
dax=None,
|
63
64
|
dmargin=None,
|
@@ -184,7 +185,7 @@ def plot_as_mobile_lines(
|
|
184
185
|
coll2.disconnect_old()
|
185
186
|
coll2.connect()
|
186
187
|
|
187
|
-
coll2.show_commands()
|
188
|
+
coll2.show_commands(verb=show_commands)
|
188
189
|
return coll2
|
189
190
|
else:
|
190
191
|
return coll2, dgroup
|
datastock/_plot_as_profile1d.py
CHANGED
@@ -62,6 +62,7 @@ def plot_as_profile1d(
|
|
62
62
|
rotation=None,
|
63
63
|
inverty=None,
|
64
64
|
bck=None,
|
65
|
+
show_commands=None,
|
65
66
|
# figure-specific
|
66
67
|
dax=None,
|
67
68
|
dmargin=None,
|
@@ -173,7 +174,7 @@ def plot_as_profile1d(
|
|
173
174
|
coll2.disconnect_old()
|
174
175
|
coll2.connect()
|
175
176
|
|
176
|
-
coll2.show_commands()
|
177
|
+
coll2.show_commands(verb=show_commands)
|
177
178
|
return coll2
|
178
179
|
else:
|
179
180
|
return coll2, dgroup
|
datastock/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# Do not edit, pipeline versioning governed by git tags!
|
2
|
-
__version__ = '0.0.
|
2
|
+
__version__ = '0.0.32'
|
@@ -5,34 +5,34 @@ datastock/_class.py,sha256=Az9PS3aSskiPMb1ekt78Y2ynBujYVc_cDjJxW9xH9g4,47
|
|
5
5
|
datastock/_class0.py,sha256=oV6Ar7in66OnjsDK7RRhe_OSt-ifBKul-x2NbucjF98,5442
|
6
6
|
datastock/_class1.py,sha256=l4W0atz_Q-ykO45eONzDtXkwCkcPKwuf2EuD9Ztwak4,29435
|
7
7
|
datastock/_class1_binning.py,sha256=G1rbejlwoDRYANI_LY4QOKWA-BEikddVM3-EklROoZQ,28336
|
8
|
-
datastock/_class1_check.py,sha256=
|
8
|
+
datastock/_class1_check.py,sha256=QN0o5Z9XOZAUIoe-dXTVNmbkj3l_v7U4lawcn8N0Yrw,52436
|
9
9
|
datastock/_class1_compute.py,sha256=9ka4MXqTb2Gwe8ZnZR31rd5QDc7-nxuhFqXpQSn_sss,28211
|
10
10
|
datastock/_class1_domain.py,sha256=TudSRoLedzU2qGOU6R1_Lx99MuqJzG0rOZl8-HZZfTU,6252
|
11
11
|
datastock/_class1_interpolate.py,sha256=TQqrkQPMjiU4prksUkKUWSsDk7fq36GpyxX0kXL0hQo,37567
|
12
12
|
datastock/_class1_uniformize.py,sha256=mYpOltqTDDjTUU_oJrRWAovW3GtI_y2kGUcH4ebHhHk,26440
|
13
13
|
datastock/_class2.py,sha256=duGFZPSBNZ0dxbZUPvv90ryG7wSW_dM-kynpa0YKcCw,46673
|
14
14
|
datastock/_class2_interactivity.py,sha256=YdM4cEjDrgh-bSsOzkkwtu-pqKoeqhSyfiZl2Udkl3E,16632
|
15
|
-
datastock/_class3.py,sha256=
|
15
|
+
datastock/_class3.py,sha256=WKFQQ85zJB371zLiSFDQiPkZgfnUgo_jQpCP9YmShek,10642
|
16
16
|
datastock/_direct_calls.py,sha256=EHFwI2mGMDqGz8_Bv2BseMBX4J8dSdE_RcNX3pt0ZYY,1801
|
17
17
|
datastock/_export_dataframe.py,sha256=fy-uJR3EhDlHvd9ls1EQna_C8fyha1jCJLu1DTKTkdo,1576
|
18
18
|
datastock/_find_plateau.py,sha256=sqnAuy0361DXkqBb_Lo1MmIGjn35tnKFvcv6MW6hifs,2685
|
19
19
|
datastock/_generic_check.py,sha256=nfD4PIInb63uiwioknFf78dE5lGpgSxoOvT5BgP2nts,24443
|
20
20
|
datastock/_generic_utils.py,sha256=iSZa_XOhOJW1Rtr5kH2dxcs_2WaAxcuFls_eEKgOOTw,15382
|
21
|
-
datastock/_plot_BvsA_as_distribution.py,sha256=
|
21
|
+
datastock/_plot_BvsA_as_distribution.py,sha256=fpRhlbv3Bk96buANC46Brc9hdLxkOAsoKpE5A9pohG0,15389
|
22
22
|
datastock/_plot_BvsA_as_distribution_check.py,sha256=7OkzsxqXvJBe6uc_7IiZNwMYWryyI1vKUYYRCkPfz7Q,13002
|
23
|
-
datastock/_plot_as_array.py,sha256=
|
24
|
-
datastock/_plot_as_mobile_lines.py,sha256=
|
25
|
-
datastock/_plot_as_profile1d.py,sha256=
|
23
|
+
datastock/_plot_as_array.py,sha256=s3Jl0B_1gJ-SewSGfyjXrtzMG1utvcq-Vyb0Vmn-rzI,75861
|
24
|
+
datastock/_plot_as_mobile_lines.py,sha256=c8StAA-msL_a333U3EHJILWDgo7siIZyDyEgMnJvK90,22972
|
25
|
+
datastock/_plot_as_profile1d.py,sha256=rxMpLL-QMHqHiAYjH7gDXZOUkMVz3ps8SlUUVNXK8Bk,23332
|
26
26
|
datastock/_plot_correlations.py,sha256=ITOypu_AEoKl0ihxocV-JVTXIHqut6p9TfG-xZmQysc,10175
|
27
27
|
datastock/_plot_misc.py,sha256=XixTi2CiihKjtQP0TRycH0b25caWN1m35DgpsDeiWZE,21729
|
28
28
|
datastock/_plot_text.py,sha256=wQPqjfpLyIioS2JeOt3E9C9HgYUJ49YEoOgRuKYvAR8,3143
|
29
29
|
datastock/_saveload.py,sha256=8SM5AdRbcy2KZfDEq5Uesvf55DXzLvPxTMUUsZqhhmk,8885
|
30
|
-
datastock/version.py,sha256=
|
30
|
+
datastock/version.py,sha256=DoX-bepDn_EGe6LwIcMmvJjqwD_t5S7ZUGxeWnZ0YXA,80
|
31
31
|
datastock/tests/__init__.py,sha256=teOo2xP0IO7PQMuMDmum61XVHe2TuxW3BiHiL73X8jQ,35
|
32
32
|
datastock/tests/test_01_DataStock.py,sha256=rIDlqIGGR6gCFtjAw66G9CF3-Mne95XF0eXtUU7wYfc,15260
|
33
33
|
datastock/tests/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
-
datastock-0.0.
|
35
|
-
datastock-0.0.
|
36
|
-
datastock-0.0.
|
37
|
-
datastock-0.0.
|
38
|
-
datastock-0.0.
|
34
|
+
datastock-0.0.32.dist-info/LICENSE,sha256=V1uXqi3vxR0QhB4QdFyjkynl6jpN4wZmlB5EMYJk0NM,1068
|
35
|
+
datastock-0.0.32.dist-info/METADATA,sha256=7V40HnzvYSYxee3fNKOk7FVtvwpVgABiz7ETfUAulZQ,8666
|
36
|
+
datastock-0.0.32.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
37
|
+
datastock-0.0.32.dist-info/top_level.txt,sha256=BzJsLLK_zZw13WQCoMhC74qWVKalnVCjBxdPXvJn7HQ,25
|
38
|
+
datastock-0.0.32.dist-info/RECORD,,
|
File without changes
|
File without changes
|