Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8]
python-version: ["3.10"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Report WPS Errors
uses: wemake-services/wemake-python-styleguide@0.14.1
continue-on-error: true
with:
reporter: 'github-pr-review'
path: './modopt'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down Expand Up @@ -98,7 +89,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.9]
python-version: ["3.7", "3.8", "3.9"]

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ All packages required by ModOpt should be installed automatically. Optional pack
In order to run the code in this repository the following packages must be
installed:

* [Python](https://www.python.org/) [> 3.6]
* [Python](https://www.python.org/) [> 3.7]
* [importlib_metadata](https://importlib-metadata.readthedocs.io/en/latest/) [==3.7.0]
* [Numpy](http://www.numpy.org/) [==1.19.5]
* [Scipy](http://www.scipy.org/) [==1.5.4]
* [tqdm]([https://progressbar-2.readthedocs.io/](https://tqdm.github.io/) [>=4.64.0]
* [tqdm](https://tqdm.github.io/) [>=4.64.0]

### Optional Packages

Expand Down
8 changes: 3 additions & 5 deletions develop.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
coverage>=5.5
flake8>=4
nose>=1.3.7
pytest>=6.2.2
pytest-cov>=2.11.1
pytest-pep8>=1.0.6
pytest-emoji>=0.2.0
pytest-flake8>=1.0.7
wemake-python-styleguide>=0.15.2
pytest-pydocstyle>=2.2.0
black
isort
pytest-black
8 changes: 4 additions & 4 deletions modopt/signal/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def mex_hat(data_point, sigma):
Examples
--------
>>> from modopt.signal.filter import mex_hat
>>> mex_hat(2, 1)
-0.3521390522571337
>>> round(mex_hat(2, 1), 15)
-0.352139052257134

"""
data_point = check_float(data_point)
Expand Down Expand Up @@ -108,8 +108,8 @@ def mex_hat_dir(data_gauss, data_mex, sigma):
Examples
--------
>>> from modopt.signal.filter import mex_hat_dir
>>> mex_hat_dir(1, 2, 1)
0.17606952612856686
>>> round(mex_hat_dir(1, 2, 1), 16)
0.1760695261285668

"""
data_gauss = check_float(data_gauss)
Expand Down
2 changes: 1 addition & 1 deletion modopt/signal/positivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def pos_recursive(input_data):

"""
if input_data.dtype == 'O':
res = np.array([pos_recursive(elem) for elem in input_data])
res = np.array([pos_recursive(elem) for elem in input_data], dtype="object")

else:
res = pos_thresh(input_data)
Expand Down
4 changes: 2 additions & 2 deletions modopt/signal/svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def find_n_pc(u_vec, factor=0.5):
)

# Get the shape of the array
array_shape = np.repeat(np.int(np.sqrt(u_vec.shape[0])), 2)
array_shape = np.repeat(int(np.sqrt(u_vec.shape[0])), 2)

# Find the auto correlation of the left singular vector.
u_auto = [
Expand Down Expand Up @@ -299,7 +299,7 @@ def svd_thresh_coef(input_data, operator, threshold, thresh_type='hard'):
a_matrix = np.dot(s_values, v_vec)

# Get the shape of the array
array_shape = np.repeat(np.int(np.sqrt(u_vec.shape[0])), 2)
array_shape = np.repeat(int(np.sqrt(u_vec.shape[0])), 2)

# Compute threshold matrix.
ti = np.array([
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ testpaths =
addopts =
--verbose
--emoji
--flake8
--cov=modopt
--cov-report=term
--cov-report=xml
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
license = 'MIT'

# Set the package classifiers
python_versions_supported = ['3.6', '3.7', '3.8', '3.9']
python_versions_supported = ['3.7', '3.8', '3.9', '3.10', '3.11']
os_platforms_supported = ['Unix', 'MacOS']

lc_str = 'License :: OSI Approved :: {0} License'
Expand Down