I have two arrays of the same shape:

```
a = numpy.array([7, 5, 0, 2, 9, 6, 4, 1])
b = numpy.array([1, 6, 3, 9, 1, 1, 3, 8])

```

I'm looking for a nice way of creating the sum product of `a` and `b` , but such that the calculation stops before reaching a limit `l`, and then returns the elements in `a` that were used for that calculation.

So in the above example, if I execute:

> 
> `numpy.dot(a,b)`
> 
> 
> 

I get `90`. However, as an example, if `l=50` what I would like instead is a function that behaves as follows:

```
>>> foo(a,b,l)
[7,5]

```