Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.univar: print correct cells value for zones in shell script style #2959

Merged
merged 2 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion raster/r.univar/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int print_stats(univar_stat *stats)
}
fprintf(stdout, "n=%lu\n", stats[z].n);
fprintf(stdout, "null_cells=%lu\n", stats[z].size - stats[z].n);
fprintf(stdout, "cells=%lu\n", stats->size);
fprintf(stdout, "cells=%lu\n", stats[z].size);
fprintf(stdout, "min=%.15g\n", stats[z].min);
fprintf(stdout, "max=%.15g\n", stats[z].max);
fprintf(stdout, "range=%.15g\n", stats[z].max - stats[z].min);
Expand Down
8 changes: 4 additions & 4 deletions raster/r.univar/testsuite/test_r_univar.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_1_zone(self):
zone=2;
n=6390
null_cells=0
cells=1710
cells=6390
min=121
max=280
range=159
Expand Down Expand Up @@ -295,7 +295,7 @@ def test_2_zone(self):
zone=2;
n=12780
null_cells=0
cells=3420
cells=12780
min=121
max=380
range=259
Expand Down Expand Up @@ -353,7 +353,7 @@ def test_3_zone(self):
zone=2;
n=12780
null_cells=0
cells=3420
cells=12780
min=121
max=380
range=259
Expand Down Expand Up @@ -415,7 +415,7 @@ def test_zone_with_gap_in_cats(self):
zone=9;
n=3600
null_cells=0
cells=12600
cells=3600
min=102
max=310
range=208
Expand Down