Skip to content

Commit

Permalink
Merge pull request #127 from decfrr/decfrr/fix-numpy-version
Browse files Browse the repository at this point in the history
Fixed the problem that caused installation to fail.
  • Loading branch information
r9y9 authored Jun 26, 2024
2 parents def3375 + d011ffe commit fe72151
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python-version: 3.7
- os: ubuntu-latest
python-version: 3.8
- os: ubuntu-latest
Expand All @@ -37,7 +35,7 @@ jobs:
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
Expand Down
2 changes: 1 addition & 1 deletion nnmnkwii/preprocessing/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def transform(self, XY):
Xc = X.copy() # this will be updated iteratively
X_aligned = np.zeros_like(longer_features)
Y_aligned = np.zeros_like(longer_features)
refined_paths = np.empty(len(X), dtype=np.object)
refined_paths = np.empty(len(X), dtype=object)

for idx in range(self.n_iter):
for idx, (x, y) in enumerate(zip(Xc, Y)):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [
"wheel",
"setuptools",
"cython>=0.21.0",
"numpy>=v1.20.0",
"numpy>=v1.20.0, <2",
"scipy",
]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def package_files(directory):
"scikit-learn",
"pysptk >= 0.1.17",
"tqdm",
"numpy >= 1.20.0, <2",
]

setup(
Expand All @@ -157,7 +158,6 @@ def package_files(directory):
package_data={"": package_data},
ext_modules=ext_modules,
cmdclass=cmdclass,
setup_requires=["numpy >= 1.20.0"],
install_requires=install_requires,
tests_require=["nose", "coverage"],
extras_require={
Expand Down
Empty file modified tests/data/questions-radio_dnn_416.hed
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __test_wrong_num_collected_files():
X[0]

yield raises(TypeError)(__test_wrong_num_args)
yield raises(RuntimeError)(__test_wrong_num_collected_files)
yield raises(ValueError)(__test_wrong_num_collected_files)


@attr("pickle")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pack_pad_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_pack_sequnce():

dataset = PyTorchDataset(X, Y, lengths)
loader = data_utils.DataLoader(
dataset, batch_size=batch_size, num_workers=1, shuffle=True
dataset, batch_size=batch_size, num_workers=0, shuffle=True
)

# Test if trining loop pass with no errors. The following code was adapted
Expand Down
4 changes: 2 additions & 2 deletions tests/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_mulaw_real():
mu = 256
y = P.mulaw_quantize(x, mu)
assert y.min() >= 0 and y.max() < mu
assert y.dtype == np.int
assert y.dtype == int
x = P.inv_mulaw_quantize(y, mu) * 32768
assert x.dtype == np.float32
x = x.astype(np.int16)
Expand Down Expand Up @@ -460,7 +460,7 @@ def test_dtw_aligner():
fs, x = wavfile.read(example_audio_file())
x = (x / 32768.0).astype(np.float32)
assert fs == 16000
x_fast = librosa.effects.time_stretch(x, 2.0)
x_fast = librosa.effects.time_stretch(x, rate=2.0)

X = _get_mcep(x, fs)
Y = _get_mcep(x_fast, fs)
Expand Down

0 comments on commit fe72151

Please sign in to comment.