We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d705a6c commit 0b7320eCopy full SHA for 0b7320e
src/utils/cnpy.hpp
@@ -103,7 +103,7 @@ namespace cnpy
103
assert(tmp_dims == ndims);
104
}
105
106
- for (int i = 1; i < ndims; i++) {
+ for (size_t i = 1; i < ndims; i++) {
107
if (shape[i] != tmp_shape[i]) {
108
std::cout <<"libnpy error: npy_save attempting to append misshaped data to " << fname
109
<< "\n";
@@ -125,7 +125,7 @@ namespace cnpy
125
126
127
unsigned int nels = 1;
128
- for (int i = 0; i < ndims; ++i) nels *= shape[i];
+ for (size_t i = 0; i < ndims; ++i) nels *= shape[i];
129
130
fwrite(data, sizeof(T), nels, fp);
131
fclose(fp);
0 commit comments