When I use the function clabel, I receive the warning:
/usr/lib/pymodules/python2.7/matplotlib/contour.py:486: DeprecationWarning: using a
non-integer number instead of an integer will result in an error in the future
nlc.append(np.r_[xy2, lc[I[1]:]])
The problem is that the array index I in lc[I[1]:]] is a float not an integer. The current code is
# Make integer
I = [np.floor(I[0]), np.ceil(I[1])]
Unfortunately, floor and ceil return floats rather than integers. I suggest converting I to integers, if possible (need to take care, make sure we don't do int(nan))
# Make integer
I = [np.floor(I[0]), np.ceil(I[1])]
I = [ int(i) if not np.isnan(i) else i for i in I ]
or something similar - is there a way to make floor and ceil return integers? If not, maybe this will do.
When I use the function
clabel, I receive the warning:The problem is that the array index
Iinlc[I[1]:]]is a float not an integer. The current code isUnfortunately,
floorandceilreturn floats rather than integers. I suggest convertingIto integers, if possible (need to take care, make sure we don't doint(nan))or something similar - is there a way to make
floorandceilreturn integers? If not, maybe this will do.