@@ -1459,7 +1459,7 @@ def test_stats_ComputeInterBandCovarianceMatrix_nodata():
14591459 ds .GetRasterBand (2 ).WriteRaster (0 , 0 , 4 , 1 , b"\x02 \x01 \xFE \x03 " )
14601460 ds .GetRasterBand (2 ).SetNoDataValue (254 )
14611461
1462- expected_cov_matrix = [[1 , - 0.5 ], [- 0.5 , 1 ]]
1462+ expected_cov_matrix = [[1 , 0 ], [0 , 1 ]]
14631463
14641464 cov_matrix = ds .ComputeInterBandCovarianceMatrix ()
14651465 assert list (chain .from_iterable (cov_matrix )) == pytest .approx (
@@ -1476,7 +1476,7 @@ def test_stats_ComputeInterBandCovarianceMatrix_nan_value():
14761476 ds .GetRasterBand (1 ).WriteRaster (0 , 0 , 4 , 1 , struct .pack ("f" * 4 , 1 , 2 , 3 , math .nan ))
14771477 ds .GetRasterBand (2 ).WriteRaster (0 , 0 , 4 , 1 , struct .pack ("f" * 4 , 2 , 1 , math .nan , 3 ))
14781478
1479- expected_cov_matrix = [[1 , - 0.5 ], [- 0.5 , 1 ]]
1479+ expected_cov_matrix = [[1 , 0 ], [0 , 1 ]]
14801480
14811481 cov_matrix = ds .ComputeInterBandCovarianceMatrix ()
14821482 assert list (chain .from_iterable (cov_matrix )) == pytest .approx (
@@ -1527,7 +1527,7 @@ def test_stats_ComputeInterBandCovarianceMatrix_mask_band():
15271527 ds .GetRasterBand (2 ).CreateMaskBand (0 )
15281528 ds .GetRasterBand (2 ).GetMaskBand ().WriteRaster (0 , 0 , 4 , 1 , b"\xFF \xFF \x00 \xFF " )
15291529
1530- expected_cov_matrix = [[1 , - 0.5 ], [- 0.5 , 1 ]]
1530+ expected_cov_matrix = [[1 , 0 ], [0 , 1 ]]
15311531
15321532 cov_matrix = ds .ComputeInterBandCovarianceMatrix ()
15331533 assert list (chain .from_iterable (cov_matrix )) == pytest .approx (
0 commit comments