Skip to content

Add cupy.correlate - #3525

Merged
asi1024 merged 8 commits into
cupy:masterfrom
Dahlia-Chehata:correlation
Jul 4, 2020
Merged

asi1024 merged 8 commits into
cupy:masterfrom
Dahlia-Chehata:correlation

Conversation

@Dahlia-Chehata

Copy link
Copy Markdown
Contributor

No description provided.

@asi1024 asi1024 added the cat:feature New features/APIs label Jul 1, 2020
@asi1024 asi1024 added this to the v8.0.0rc1 milestone Jul 1, 2020
@asi1024 asi1024 self-assigned this Jul 1, 2020
Comment thread cupy/math/misc.py Resolved
Comment thread cupy/statistics/correlation.py Resolved
Comment thread cupy/statistics/correlation.py Resolved
Comment thread cupy/statistics/correlation.py Resolved
Comment thread cupy/statistics/correlation.py Resolved
Comment thread cupy/statistics/correlation.py Resolved
@asi1024

asi1024 commented Jul 2, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit d6de99a:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit d6de99a, target branch master) failed with status FAILURE.

@Dahlia-Chehata

Dahlia-Chehata commented Jul 2, 2020 •

Copy link
Copy Markdown
Contributor Author

According to CI, numpy didn't raise ValueError when the input is empty.

>>> np.correlate(np.array([]), np.array([]))

File "<array_function internals>", line 5, in correlate
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/numpy/core/numeric.py", line 713, in correlate
return multiarray.correlate2(a, v, mode)
ValueError: first array argument cannot be empty

I am thinking of removing this test

Comment thread cupy/math/misc.py Resolved
@asi1024

asi1024 commented Jul 2, 2020

Copy link
Copy Markdown
Member

@Dahlia-Chehata So please check the return value of numpy.correlate and cupy.correlate for empty input.

@asi1024

asi1024 commented Jul 3, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 2b95b6d:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 2b95b6d, target branch master) failed with status FAILURE.

@Dahlia-Chehata

Dahlia-Chehata commented Jul 3, 2020 •

Copy link
Copy Markdown
Contributor Author

@asi1024 How about removing empty test ?

numpy raises ValueError for empty inputs so is the current implementation but CI says otherwise #3525 (comment).
And the return value for empty inputs fail with 2 modes

@asi1024

asi1024 commented Jul 3, 2020

Copy link
Copy Markdown
Member

If NumPy's behavior for the empty input depends on its version, please follow the newest stable version and add @testing.with_requires('numpy>=...') decorator to the test. If not, please fix your implementation.

@asi1024

asi1024 commented Jul 3, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 5ddbfef:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 5ddbfef, target branch master) failed with status FAILURE.

@asi1024

asi1024 commented Jul 3, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 5ddbfef:

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 5ddbfef, target branch master) failed with status FAILURE.

@asi1024

asi1024 commented Jul 3, 2020

Copy link
Copy Markdown
Member

Jenkins, test this please.

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 5ddbfef:

@chainer-ci

Copy link
Copy Markdown
Member

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

@asi1024

asi1024 commented Jul 4, 2020

Copy link
Copy Markdown
Member

LGTM.

@asi1024
asi1024 merged commit 67bdb12 into cupy:master Jul 4, 2020
@Dahlia-Chehata
Dahlia-Chehata deleted the correlation branch July 6, 2020 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:feature New features/APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants