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: 
Zero-size array passed to `numpy.mean` raises this warning (as indicated in several comments).

For some other candidates:

* `median` also raises this warning on zero-sized array.

other candidates do not raise this warning:

* `min,argmin` both raise `ValueError` on empty array
* `randn` takes `*arg`; using `randn(*[])` returns a single random number
* `std,var` return `nan` on an empty array
I encount this while I was calculating `np.var(np.array([]))`. `np.var` will divide size of the array which is zero in this case.