BUG: array too long, raises exception with newer numpy closes #967

see issue #967 for test failures with newer numpy

in older numpy excess elements were ignored (in assignment to a part of an array), numbers were correct.
Fix in this PR creates the array in the right size (without excess elements, that were nan in this case)

```
>>> x = np.zeros(5)
>>> x[np.arange(5)<3] = np.ones(4)
>>> x
array([ 1.,  1.,  1.,  0.,  0.])
>>> np.__version__
'1.5.1'
```

```
>>> numpy.__version__
'1.7.1'

>>> x = np.zeros(5)
>>> x[np.arange(5)<3] = np.ones(4)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: NumPy boolean array indexing assignment cannot assign 4 input values to the 3 output values where
the mask is true
```