Question: As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin.

```
Warning: invalid value encountered in double_scalars
Warning: invalid value encountered in double_scalars
Warning: invalid value encountered in double_scalars
Warning: invalid value encountered in double_scalars

```

Is this is a Numpy warning, and what is a double scalar?

From Numpy I use

```
min(), argmin(), mean() and random.randn()

```

I also use Matplotlib

Answer: 
Sometimes NaNs or null values in data will generate this error with Numpy. If you are ingesting data from say, a CSV file or something like that, and then operating on the data using numpy arrays, the problem could have originated with your data ingest. You could try feeding your code a small set of data with known values, and see if you get the same result.
Whenever you are working with csv imports, try to use df.dropna() to avoid all such warnings or errors.