radioactiveshrimp 0.1.0__cp39-abi3-manylinux_2_28_x86_64.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.
@@ -0,0 +1,5 @@
1
+ from radioactiveshrimp._core import hello_from_bin
2
+
3
+
4
+ def hello() -> str:
5
+ return hello_from_bin()
Binary file
@@ -0,0 +1 @@
1
+ def hello_from_bin() -> str: ...
@@ -0,0 +1,5 @@
1
+ """
2
+ Differential subpackage containing diff function.
3
+ """
4
+ from .discrete import diff
5
+ __all__=['diff']
@@ -0,0 +1,39 @@
1
+ def diff(t, x):
2
+ """
3
+ Calculate discrete derivatives for timeseries data.
4
+
5
+ A discrete derivative is the quotient of the change in value of
6
+ one variable, x, and the change in value of another, t.
7
+
8
+ Formula: v(t) = (x(t_k) - x(t_k-1)) / (t_k - t_k-1)
9
+
10
+ Args:
11
+ t (array): Array of time value t_k, where k is the index of time
12
+ x (array): Array of signal value x
13
+
14
+ Returns:
15
+ array: Array of calculated discrete derivative values
16
+
17
+ Raises:
18
+ ValueError: If length of t and x arrays are not equal
19
+
20
+ Example:
21
+ >>> arithmetic_progression([0, 0.1, 0.3, 0.4, 0.55, 0.67, 0.71], [23.1, 22.5, 23.5, 21.88, 22.5, 23.5, 24.88])
22
+ [-6.000000000000014, 5.0, -16.200000000000003, 4.133333333333339, 8.333333333333334, 34.50000000000004]
23
+ """
24
+ # check equality of lengths of the two arrays
25
+ if (len(t) != len(x)):
26
+ raise ValueError("The input arrays are not of equal length")
27
+
28
+ # compute the discrete derivative v(t), store values as python array
29
+ v = [0 for _ in range(len(t)-1)] #v will be one value shorter than x and t
30
+ for index in range(len(v)):
31
+ v[index] = (x[index+1]-x[index])/(t[index+1]-t[index])
32
+
33
+ # return v(t) array
34
+ return v
35
+
36
+ # t = [0, 0.1, 0.3, 0.4, 0.55, 0.67, 0.71]
37
+ # x = [23.1, 22.5, 23.5, 21.88, 22.5, 23.5, 24.88]
38
+ # v = diff(t,x)
39
+ # print(v)
File without changes
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: radioactiveshrimp
3
+ Version: 0.1.0
4
+ Requires-Dist: twine>=6.1.0
5
+ Summary: Add your description here
6
+ Author-email: radioactiveshrimp <radioactiveshrimpmail@gmail.com>
7
+ Requires-Python: >=3.12
8
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
9
+
10
+ README for Radioactiveshrimp package!
11
+
@@ -0,0 +1,9 @@
1
+ radioactiveshrimp-0.1.0.dist-info/METADATA,sha256=hBcyOB8eYNUHqcmuxiZE3ymZbJTnA-H15M7MmDhDaEs,322
2
+ radioactiveshrimp-0.1.0.dist-info/WHEEL,sha256=rXa1hNKJPd-J1se02jkvuZn4v_WM-W9q2R8LeAdqQiM,97
3
+ radioactiveshrimp/__init__.py,sha256=QY4ait-Lo2WQdyx7MU8N6a1v2ZYyAmYRqzYqdNbiavI,101
4
+ radioactiveshrimp/_core.abi3.so,sha256=3IMwsP7UrgNWdKdw2Pl11_VUQF8NqPy1xyyPuzkREdA,489672
5
+ radioactiveshrimp/_core.pyi,sha256=b6oJaUXUzEzqUE5rpqefV06hl8o_JCU8pgKgIIzQgmc,33
6
+ radioactiveshrimp/differential/__init.py__,sha256=jOhQKr6xM_7TVUt0GWRddtkgBvNn5I873WZcArT-GtE,101
7
+ radioactiveshrimp/differential/discrete.py,sha256=9-w6Avz4MZfu8gFhJU8kTvryn9oT2xS1TvvYQ_8pmPU,1371
8
+ radioactiveshrimp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ radioactiveshrimp-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.3)
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-abi3-linux_x86_64