RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility

According to MAINT: silence Cython warnings about changes dtype/ufunc size. – numpy/numpy: These warnings are visible whenever you import scipy (or another package) that was compiled against an older numpy than is installed. and the checks are inserted by Cython (hence are present in any module compiled with it). Long story short, these warnings should be benign … Read more

Python/Numpy MemoryError

Rewrite to and this will use much less memory. Whereas p = p*alpha allocates a whole new matrix for the result of p*alpha and then discards the old p; p*= alpha does the same thing in place. In general, with big matrices, try to use op= assignment.

How can I remove Nan from list Python/NumPy

The question has changed, so to has the answer: Strings can’t be tested using math.isnan as this expects a float argument. In your countries list, you have floats and strings. In your case the following should suffice: Old answer In your countries list, the literal ‘nan’ is a string not the Python float nan which is equivalent to: In your case the following should suffice:

RuntimeWarning: divide by zero encountered in log

numpy.log10(prob) calculates the base 10 logarithm for all elements of prob, even the ones that aren’t selected by the where. If you want, you can fill the zeros of prob with 10**-10 or some dummy value before taking the logarithm to get rid of the problem. (Make sure you don’t compute prob > 0.0000000001 with dummy values, though.)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)