Skip to content

Commit dd38483

Browse files
authored
Merge pull request #2 from kfish/warnings
Fix compile warnings
2 parents 3520694 + 7973877 commit dd38483

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

matplotlibcpp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ template <typename Matrix> PyObject *get_2darray(const Matrix &A) {
457457

458458
double *vd_begin = static_cast<double *>(PyArray_DATA(varray));
459459

460-
for (std::size_t i = 0; i < A.rows(); ++i) {
461-
for (std::size_t j = 0; j < A.cols(); ++j) {
460+
for (ssize_t i = 0; i < A.rows(); ++i) {
461+
for (ssize_t j = 0; j < A.cols(); ++j) {
462462
*(vd_begin + i * A.cols() + j) = A(i, j);
463463
}
464464
}
@@ -550,10 +550,10 @@ bool plot(const VectorY &y, const std::string &format = "",
550550
// Note: cannot be an unsigned type for some reason, yields an overflow
551551
// problem..
552552
std::vector<int> x(y.size());
553-
for (int i = 0; i < x.size(); ++i)
553+
for (size_t i = 0; i < x.size(); ++i)
554554
x.at(i) = i;
555555

556-
return plot(x, y, format);
556+
return plot(x, y, format, keywords);
557557
}
558558

559559
// @brief standard plot function if x data is not specified and the formatting

0 commit comments

Comments
 (0)