Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
fakufaku committed May 7, 2024
1 parent b4abb9b commit 3984eaa
Show file tree
Hide file tree
Showing 30 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/adaptive_filter_stft_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
In this example, we will run adaptive filters for system
identification, but in the frequeny domain.
"""

from __future__ import division, print_function

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions examples/adaptive_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
In this example, we will run adaptive filters for system identification.
"""

from __future__ import division, print_function

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions examples/beamforming_delay_and_sum.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This example shows how to create delay and sum beamformers
"""

from __future__ import division, print_function

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions examples/bss_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
This script requires the `mir_eval` to run, and `tkinter` and `sounddevice` packages for the GUI option.
"""

import time

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions examples/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Example of the basic operations with ``pyroomacoustics.datasets.Dataset``
and ``pyroomacoustics.datasets.Sample`` classes
"""

from pyroomacoustics.datasets import Dataset, Sample

# Prepare a few artificial samples
Expand Down
1 change: 1 addition & 0 deletions examples/raytracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This example program demonstrates the use of ray tracing
for the simulation of rooms of different sizes.
"""

from __future__ import print_function

import argparse
Expand Down
1 change: 1 addition & 0 deletions examples/room_L_shape_3d_rt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
The simulation is done using the hybrid ISM/RT simulator.
"""

from __future__ import print_function

import time
Expand Down
1 change: 1 addition & 0 deletions examples/room_complex_wall_materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
2022 (c) @noahdeetzers, @fakufaku
"""

import matplotlib.pyplot as plt
import numpy as np

Expand Down
1 change: 1 addition & 0 deletions examples/room_from_rt60.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
The simulation is pure image source method.
The audio sample with the reverb added is saved back to `examples/samples/guitar_16k_reverb.wav`.
"""

import argparse

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions examples/room_from_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
The STL file was kindly provided by Diego Di Carlo (@Chutlhu).
"""

import argparse
import os
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion examples/simulation_with_measured_directivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class DirectionVector
~ Prerak SRIVASTAVA, 8/11/2022
"""


import os

import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/adaptive/lms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Implementations of adaptive filters from the LMS class. These algorithms have a
low complexity and reliable behavior with a somewhat slower convergence.
"""

from __future__ import absolute_import, division, print_function

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pyroomacoustics/adaptive/subband_lms.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


class SubbandLMS:

"""
Frequency domain implementation of LMS. Adaptive filter for each
subband.
Expand Down
1 change: 0 additions & 1 deletion pyroomacoustics/beamforming.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ def circular_microphone_array_xyplane(


class MicrophoneArray(object):

"""Microphone array class."""

def __init__(self, R, fs, directivity=None):
Expand Down
4 changes: 1 addition & 3 deletions pyroomacoustics/bss/fastmnmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ def separate():
Y_FTM = np.einsum("nft, nfm -> ftm", lambda_NFT, G_NFM)

# update G_NFM (diagonal element of spatial covariance matrices)
numerator = np.einsum(
"nft, ftm -> nfm", lambda_NFT, Qx_power_FTM / (Y_FTM**2)
)
numerator = np.einsum("nft, ftm -> nfm", lambda_NFT, Qx_power_FTM / (Y_FTM**2))
denominator = np.einsum("nft, ftm -> nfm", lambda_NFT, 1 / Y_FTM) + eps
G_NFM *= np.sqrt(numerator / denominator)
Y_FTM = np.einsum("nft, nfm -> ftm", lambda_NFT, G_NFM)
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/datasets/cmu_arctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
URL: http://www.festvox.org/cmu_arctic/
"""

import os

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/datasets/tests/test_corpus_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Example of the basic operations with ``pyroomacoustics.datasets.Dataset``
and ``pyroomacoustics.datasets.Sample`` classes
"""

from pyroomacoustics.datasets import Dataset, Sample


Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/doa/grid.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Routines to perform grid search on the sphere
"""

from __future__ import absolute_import, division, print_function

from abc import ABCMeta, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/doa/plotters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A collection of functions to plot maps and points on circles and spheres.
"""

import numpy as np


Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/doa/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This module contains useful functions to compute distances and errors on on
circles and spheres.
"""

from __future__ import division

import collections
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/experimental/signals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A few test signals like sweeps and stuff.
"""

from __future__ import division, print_function

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion pyroomacoustics/open_sofa_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ def plot(self, freq_bin=0, n_grid=100, ax=None, depth=False, offset=None):


class SOFADirectivityFactory:

"""
This class reads measured directivities from a
`SOFA <https://www.sofaconventions.org>`_ format file.
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_bandpass_filterbank.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This tests the construction of a bank of octave filters
"""

import numpy as np
from scipy.signal import sosfreqz

Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_issue_22.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
If the C module is not installed (pure python
fallback version), then nothing is done.
"""

import numpy as np

import pyroomacoustics
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Just run the Material command with a bunch of inputs to make sure
it works as expected
"""

import pyroomacoustics as pra

scat_test = {
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_random_ism.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Script to test removal of sweeping echoes with randomized image method
"""

import pyroomacoustics as pra
from pyroomacoustics import metrics as met

Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_room_mix.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests the mixing function of ``Room.simulate``
"""

import unittest

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/test_sofa_directivities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
To generate the samples run this file: `python ./test_sofa_directivities.py`
"""

import argparse
import os
import warnings
Expand Down
1 change: 1 addition & 0 deletions pyroomacoustics/tests/tests_libroom/test_shoebox_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
It was created to address Issue #293 on github.
https://github.com/LCAV/pyroomacoustics/issues/293<Paste>
"""

import numpy as np
import pytest

Expand Down
1 change: 0 additions & 1 deletion pyroomacoustics/transform/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""


from . import stft
from .dft import DFT
from .stft import STFT

0 comments on commit 3984eaa

Please sign in to comment.