Skip to content

Commit 2189bc0

Browse files
authored
Update custom_kernels_statistics.cpp
1 parent c785c87 commit 2189bc0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dpnp/backend/custom_kernels_statistics.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ void custom_cov_c(void* array1_in, void* result1, size_t nrows, size_t ncols)
4242
_DataType* array_1 = reinterpret_cast<_DataType*>(array1_in);
4343
_DataType* result = reinterpret_cast<_DataType*>(result1);
4444

45+
if (!nrows || !ncols)
46+
{
47+
return;
48+
}
49+
4550
auto policy = oneapi::dpl::execution::make_device_policy<class custom_cov_c_kernel<_DataType>>(DPNP_QUEUE);
4651

4752
_DataType* mean = reinterpret_cast<_DataType*>(dpnp_memory_alloc_c(nrows * sizeof(_DataType)));

0 commit comments

Comments
 (0)