mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[python] Fix warning: comparisons between signed and unsigned integers
This commit is contained in:
committed by
LeaNumworks
parent
e314f2eb65
commit
154625a945
@@ -263,7 +263,7 @@ mp_obj_t modpyplot_hist(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
|
||||
// Fill the bin edges list
|
||||
for (int i = 0; i < nBins+1; i++) {
|
||||
for (size_t i = 0; i < nBins+1; i++) {
|
||||
edgeItems[i] = mp_obj_new_float(min+i*binWidth);
|
||||
}
|
||||
}
|
||||
@@ -334,7 +334,7 @@ mp_obj_t modpyplot_plot(size_t n_args, const mp_obj_t *args) {
|
||||
|
||||
// Create the default xItems: [0, 1, 2,...]
|
||||
xItems = m_new(mp_obj_t, length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
for (size_t i = 0; i < length; i++) {
|
||||
xItems[i] = mp_obj_new_float((float)i);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -62,7 +62,7 @@ T PlotStore::ListIterator<T>::operator*() {
|
||||
};
|
||||
|
||||
void checkFloatType(mp_obj_t * elements, size_t nbOfElements) {
|
||||
for (int i = 0; i < nbOfElements; i++) {
|
||||
for (size_t i = 0; i < nbOfElements; i++) {
|
||||
// TODO: we don't take advantage of the fact that we extracted the value at the sametime... Maybe change the way things are done, build the c objects in addItem instead of allocating them on the python heap? Or use float array in python?
|
||||
mp_float_t value;
|
||||
if (!mp_obj_get_float_maybe(elements[i], &value)) {
|
||||
|
||||
Reference in New Issue
Block a user