#213 Add corrcoef, cov, cross, cummax

Merged
laich merged 2 commits from :task4 into master 1 year ago
Leeinsn commented 1 year ago
zoulq reviewed 1 year ago
@@ -0,0 +41,4 @@


def test_corrcoef4():
np_1 = np.random.randint(0, 10, (3, 5)).astype(np.int32)
zoulq commented 1 year ago
实现代码中有complex64类型分支,建议用一个测试用例覆盖
Leeinsn commented 1 year ago
在corrcoef计算中,需要使用diag算法。经过调研,mindspore.numpy.diag(), mindspore.ops.diag()均不支持复数运算。因此complex类型测试用例未通过,源代码由于基于pytorch中corrcoef和cov实现,复数部分未删减,作为预留。
zoulq reviewed 1 year ago
testing/ut/pytorch/functional/test_cov.py
@@ -0,0 +52,4 @@
ms_result = ms_torch.cov(ms_tensor)

torch_tensor = torch.tensor(np_1)
torch_result = torch.cov(torch_tensor)
zoulq commented 1 year ago
实现代码中,有fweights和aweights非None的分支处理,建议用一个测试用例覆盖
Leeinsn commented 1 year ago
已添加
Leeinsn marked this conversation as resolved
laich merged commit 830d0b9cb9 into master 1 year ago
The pull request has been merged as 830d0b9cb9.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.