astropy/astropy — pull request #2697 by cgohlke (2014-07-06 00:07:03+00:00)
Title: Fix integer overflow in np.product

On win-amd64-py3.x, [test_convolve_fft.test_big_fail](https://github.com/astropy/astropy/blob/master/astropy/convolution/tests/test_convolve_fft.py#L462) fails to raise a ValueError due to an integer overflow in np.product.
The following code raises a RuntimeWarning and allocates huge amounts of RAM:
```
import numpy as np
from astropy. convolution import convolve_fft
arr = np.empty([512, 512, 512], dtype=np.complex)
convolve_fft(arr, arr)
```
```
X:\Python34\lib\site-packages\astropy\convolution\convolve.py:391: RuntimeWarning: overflow encountered in long_scalars
array_size_B = np.product(arrayshape)*np.dtype(complex_dtype).itemsize
```