Browse code

change floor to celing

Zuguang Gu authored on 19/11/2018 07:35:42
Showing1 changed files

... ...
@@ -824,5 +824,5 @@ to_unit = function(str) {
824 824
 resize_matrix = function(mat, nr, nc) {
825 825
     w_ratio = nc/ncol(mat)
826 826
     h_ratio = nr/nrow(mat)
827
-    mat[ floor(1:nr / h_ratio), floor(1:nc / w_ratio), drop = FALSE]
827
+    mat[ ceiling(1:nr / h_ratio), ceiling(1:nc / w_ratio), drop = FALSE]
828 828
 }