Skip to content

Commit

Permalink
ruff check
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvallat committed Dec 21, 2024
1 parent 3d29251 commit c9d85d8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/antropy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Import AntroPy objects
from .utils import *
from .entropy import *
from .fractal import *
from .utils import *

__version__ = "0.1.7"
5 changes: 3 additions & 2 deletions src/antropy/entropy.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""Entropy functions"""

from math import factorial, log

import numpy as np
from numba import jit, types
from math import factorial, log
from sklearn.neighbors import KDTree
from scipy.signal import periodogram, welch
from sklearn.neighbors import KDTree

from .utils import _embed, _xlogx

Expand Down
3 changes: 2 additions & 1 deletion src/antropy/fractal.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Fractal functions"""

from math import floor, log

import numpy as np
from numba import jit, types
from math import log, floor

from .entropy import num_zerocross
from .utils import _linear_regression, _log_n
Expand Down
3 changes: 2 additions & 1 deletion src/antropy/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Helper functions"""

from math import floor, log

import numpy as np
from numba import jit
from math import log, floor

all = ["_embed", "_linear_regression", "_log_n", "_xlog2x"]
epsilon = 10e-9
Expand Down
18 changes: 9 additions & 9 deletions tests/test_entropy.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"""Test entropy functions."""

import unittest

import numpy as np
from numpy.testing import assert_equal
from numpy import apply_along_axis as aal
from numpy.testing import assert_equal
from utils import ARANGE, NORMAL_TS, PURE_SINE, RANDOM_TS, RANDOM_TS_LONG, TEST_DTYPES

from antropy import (
perm_entropy,
spectral_entropy,
svd_entropy,
sample_entropy,
app_entropy,
hjorth_params,
lziv_complexity,
num_zerocross,
hjorth_params,
perm_entropy,
sample_entropy,
spectral_entropy,
svd_entropy,
)

from antropy.utils import _xlogx

from utils import RANDOM_TS, NORMAL_TS, RANDOM_TS_LONG, PURE_SINE, ARANGE, TEST_DTYPES

SF_TS = 100
BANDT_PERM = [4, 7, 9, 10, 6, 11, 3]

Expand Down
9 changes: 4 additions & 5 deletions tests/test_fractal.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"""Test fractal dimension functions."""

import unittest

import numpy as np
from numpy.testing import assert_equal
from numpy import apply_along_axis as aal
from antropy import petrosian_fd, katz_fd, higuchi_fd, detrended_fluctuation
import stochastic.processes.noise as sn

from numpy.testing import assert_equal
from utils import ARANGE, NORMAL_TS, PURE_COSINE, PURE_SINE, RANDOM_TS, TEST_DTYPES

from utils import RANDOM_TS, NORMAL_TS, PURE_SINE, PURE_COSINE, ARANGE, TEST_DTYPES
from antropy import detrended_fluctuation, higuchi_fd, katz_fd, petrosian_fd

PPG_SIGNAL = np.array(
[
Expand Down

0 comments on commit c9d85d8

Please sign in to comment.