Skip to content

Commit 07a0564

Browse files
Merge branch 'master' into gold/2021
2 parents 8a12e41 + 5ed6898 commit 07a0564

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

dpnp/dpnp_array.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,5 +741,22 @@ def transpose(self, *axes):
741741

742742
return dpnp.transpose(self, axes)
743743

744-
# 'var',
744+
def var(self, axis=None, dtype=None, out=None, ddof=0, keepdims=False):
745+
"""
746+
Returns the variance of the array elements along given axis.
747+
748+
Masked entries are ignored, and result elements which are not
749+
finite will be masked.
750+
751+
Refer to `numpy.var` for full documentation.
752+
753+
See Also
754+
--------
755+
:obj:`numpy.ndarray.var` : corresponding function for ndarrays
756+
:obj:`numpy.var` : Equivalent function
757+
758+
"""
759+
760+
return dpnp.var(self, axis, dtype, out, ddof, keepdims)
761+
745762
# 'view'

tests/skipped_tests.tbl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,16 +1355,6 @@ tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_h
13551355
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_same_value
13561356
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_basic
13571357
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_mismatch
1358-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_all
1359-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_axis
1360-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_all
1361-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_all_ddof
1362-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_axis
1363-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_axis_ddof
1364-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_all
1365-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_all_ddof
1366-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_axis
1367-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_axis_ddof
13681358
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_all_nan
13691359
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_float16
13701360
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_huge

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ tests/third_party/cupy/sorting_tests/test_sort.py::TestPartition_param_2_{extern
162162
tests/third_party/cupy/sorting_tests/test_sort.py::TestPartition_param_2_{external=True, length=10}::test_partition_negative_axis
163163
tests/third_party/cupy/statistics_tests/test_correlation.py::TestCov::test_cov_empty
164164
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_external_mean_axis
165-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_axis_ddof
166165

167166
tests/test_linalg.py::test_eig_arange[16-float64]
168167
tests/test_linalg.py::test_eig_arange[16-float32]
@@ -1550,16 +1549,6 @@ tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_h
15501549
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_same_value
15511550
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_basic
15521551
tests/third_party/cupy/statistics_tests/test_histogram.py::TestHistogram::test_histogram_weights_mismatch
1553-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_all
1554-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_mean_axis
1555-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_all
1556-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_all_ddof
1557-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_axis
1558-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_std_axis_ddof
1559-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_all
1560-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_all_ddof
1561-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_axis
1562-
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestMeanVar::test_var_axis_ddo
15631552
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_all_nan
15641553
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_float16
15651554
tests/third_party/cupy/statistics_tests/test_meanvar.py::TestNanMeanAdditional::test_nanmean_huge

0 commit comments

Comments
 (0)