TypeError: ‘float’ object is not callable

There is an operator missing, likely a *: The “is not callable” occurs because the parenthesis — and lack of operator which would have switched the parenthesis into precedence operators — make Python try to call the result of -3.7 (a float) as a function, which is not allowed. The parenthesis are also not needed in this case, the following may … Read more

‘Conda’ is not recognized as internal or external command

Although you were offered a good solution by others I think it is helpful to point out what is really happening. As per the Anaconda 4.4 changelog, https://docs.anaconda.com/anaconda/reference/release-notes/#what-s-new-in-anaconda-4-4: On Windows, the PATH environment variable is no longer changed by default, as this can cause trouble with other software. The recommended approach is to instead use Anaconda … Read more

sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)

This might happen inside scikit, and it depends on what you’re doing. I recommend reading the documentation for the functions you’re using. You might be using one which depends e.g. on your matrix being positive definite and not fulfilling that criteria. EDIT: How could I miss that: is obviously wrong. Right would be: and You … Read more

Importing requests module does not work

The most common reason for this is that you have two versions of Python 2.x, and the pip that comes first in your PATH doesn’t go with the python that comes first in your PATH. There are two ways that can happen. First, you may have, e.g., /usr/local/bin before /usr/bin on your PATH, but your /usr/local copy of Python doesn’t have pip. So, when you run pip install requests, that’s /usr/bin/pip, which … Read more

What does hash do in python?

A hash is an fixed sized integer that identifies a particular value. Each value needs to have its own hash, so for the same value you will get the same hash even if it’s not the same object. Hash values need to be created in such a way that the resulting values are evenly distributed … Read more