complexeva 0.2.0__tar.gz → 0.2.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: complexeva
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Home-page:
5
5
  Author: Don Yin
6
6
  Author-email: don_yin@outlook.com
@@ -15,9 +15,14 @@ implementations of complexity measures in 1D sequences
15
15
 
16
16
  # examples
17
17
  ```python
18
- from complexeva import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
18
+ from complexeva.sequence import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
19
19
 
20
20
  signal = numpy.random.rand(1000) # shape: (1000,)
21
21
  complexity = hfd(signal)
22
22
  print(complexity)
23
23
  ```
24
+
25
+ # install
26
+ ```bash
27
+ pip install complexeva
28
+ ```
@@ -3,9 +3,14 @@ implementations of complexity measures in 1D sequences
3
3
 
4
4
  # examples
5
5
  ```python
6
- from complexeva import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
6
+ from complexeva.sequence import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
7
7
 
8
8
  signal = numpy.random.rand(1000) # shape: (1000,)
9
9
  complexity = hfd(signal)
10
10
  print(complexity)
11
+ ```
12
+
13
+ # install
14
+ ```bash
15
+ pip install complexeva
11
16
  ```
@@ -26,6 +26,7 @@ def compute_L_x(X, k_max=16):
26
26
 
27
27
  def hfd(X, k_max=16):
28
28
  """expect a 1d numpy array as input"""
29
+ assert X.ndim == 1, f"X must be a 1d numpy array, got shape {X.shape}"
29
30
  x, L = compute_L_x(X, k_max)
30
31
  A = numpy.column_stack((x, numpy.ones_like(x)))
31
32
  beta, _, _, _ = numpy.linalg.lstsq(A, L, rcond=None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: complexeva
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Home-page:
5
5
  Author: Don Yin
6
6
  Author-email: don_yin@outlook.com
@@ -15,9 +15,14 @@ implementations of complexity measures in 1D sequences
15
15
 
16
16
  # examples
17
17
  ```python
18
- from complexeva import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
18
+ from complexeva.sequence import lyapunov_exponent, hfd, lempel_ziv, compression_complexity
19
19
 
20
20
  signal = numpy.random.rand(1000) # shape: (1000,)
21
21
  complexity = hfd(signal)
22
22
  print(complexity)
23
23
  ```
24
+
25
+ # install
26
+ ```bash
27
+ pip install complexeva
28
+ ```
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="complexeva",
5
- version="0.2.0",
5
+ version="0.2.1",
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  author="Don Yin",
File without changes