Skip to content

Adding a workaround for even-length inputs to scipy.signal.sepfir2d - #3750

Merged
takagi merged 1 commit into
cupy:masterfrom
coderforlife:bsplines_scipy_workaround.py
Aug 11, 2020
Merged

takagi merged 1 commit into
cupy:masterfrom
coderforlife:bsplines_scipy_workaround.py

Conversation

@coderforlife

Copy link
Copy Markdown
Contributor

test_bsplines.py has been failing randomly due to a bug in scipy where out-of-bounds memory is being read under certain circumstance.

A bug report has been submitted to scipy: scipy/scipy#12691

See #3645 (comment) for some other details.

@coderforlife coderforlife changed the title Adding a workaround for even-length inputs to scipy.signal.sepfir2 Adding a workaround for even-length inputs to scipy.signal.sepfir2d Aug 10, 2020
@leofang

leofang commented Aug 10, 2020

Copy link
Copy Markdown
Member

Could it be that SciPy pads the array somewhere to make it of odd length? On the one hand it's nice that you already made even length work and we could probably just keep it while waiting for SciPy to fix, on the other hand since we can't test against SciPy for even lengths it's indeed nerve wracking...

@leofang

leofang commented Aug 10, 2020

Copy link
Copy Markdown
Member

Let me kick off the CI while waiting for the core devs' opinions...
Jenkins, test this please

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit b904294:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit b904294, target branch master) succeeded!

@coderforlife

Copy link
Copy Markdown
Contributor Author

No, they do not pad, they read random memory.

@takagi

takagi commented Aug 11, 2020

Copy link
Copy Markdown
Contributor

I think it is okay to make it accept odd-length hrow and hcol.

@takagi

takagi commented Aug 11, 2020

Copy link
Copy Markdown
Contributor

LGTM!

@takagi
takagi merged commit 73a2540 into cupy:master Aug 11, 2020
@takagi takagi added the cat:numpy-compat Follow the NumPy/SciPy spec changes label Aug 11, 2020
@takagi takagi added this to the v8.0.0rc1 milestone Aug 11, 2020
@coderforlife
coderforlife deleted the bsplines_scipy_workaround.py branch September 12, 2020 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:numpy-compat Follow the NumPy/SciPy spec changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants