SALib IndexError for FAST with low number of samples
Hi,

FAST behaves strangely when a low number of samples is used. I run the Ishigami example model function by using the script

``` python
from SALib.sample import fast_sampler
from SALib.analyze import fast
from SALib.test_functions import Ishigami

problem = {
    'num_vars': 3,
    'names': ['x1', 'x2', 'x3'],
    'bounds': [[-3.14159265359, 3.14159265359],
               [-3.14159265359, 3.14159265359],
               [-3.14159265359, 3.14159265359]]
}

param_values = fast_sampler.sample(problem, 33)

Y = Ishigami.evaluate(param_values)

Si = fast.analyze(problem, Y, print_to_console=False)
```

Using more than 33 samples (tested with > 70) runs perfectly fine. However, using this (33) or lower sample values results in the following error:

```
SALib\\sample\\fast_sampler.py:39: RuntimeWarning: invalid value encountered in remainder
  omega[1:] = np.arange(D - 1) % m + 1
\\SALib\\analyze\\fast.py:70: RuntimeWarning: invalid value encountered in remainder
  omega[1:] = np.arange(D - 1) % m + 1
\\SALib\\analyze\\fast.py:88: RuntimeWarning: invalid value encountered in power
  Sp = np.power(np.absolute(f[np.arange(1, int(N / 2))]) / N, 2)
Traceback (most recent call last):
  File "test.py", line 17, in <module>
    Si = fast.analyze(problem, Y, print_to_console=False)
  File "SALib\\analyze\\fast.py", line 78, in analyze
    Si['S1'][i] = compute_first_order(Y[l], N, M, omega[0])
  File "SALib\\analyze\\fast.py", line 90, in compute_first_order
    D1 = 2 * np.sum(Sp[np.arange(1, M + 1) * int(omega) - 1])
IndexError: index 15 is out of bounds for axis 0 with size 15
```

Although such a low sampling number is rarely needed in practice, it would be good to have an automatic check / warning if the number of samples is too low in case this error should be related to accuracy reasons in the FAST approach.

diff --git a/SALib/sample/fast_sampler.py b/SALib/sample/fast_sampler.py
index fd4c5df..32d9184 100755
--- a/SALib/sample/fast_sampler.py
+++ b/SALib/sample/fast_sampler.py
@@ -27,6 +27,10 @@ def sample(problem, N, M=4):
         Fourier series decomposition (default 4)
     """
 
+    if N < 4*M**2:
+        raise ValueError("""
+        Sample size N > 4M^2 is required. M=4 by default.""")
+
     D = problem['num_vars']
 
     omega = np.empty([D])
diff --git a/examples/fast/fast.py b/examples/fast/fast.py
index 9c24d4a..9c20b77 100644
--- a/examples/fast/fast.py
+++ b/examples/fast/fast.py
@@ -1,14 +1,11 @@
 import sys
+sys.path.append('../..')
 
 from SALib.analyze import fast
 from SALib.sample import fast_sampler
 from SALib.test_functions import Ishigami
 from SALib.util import read_param_file
 
-
-sys.path.append('../..')
-
-
 # Read the parameter range file and generate samples
 problem = read_param_file('../../SALib/test_functions/params/Ishigami.txt')
 

['SALib/sample/fast_sampler.py', 'examples/fast/fast.py']