title: Is there anyway to use the index in python numpy vectorize functions?
body: <p>The below example illustrates my problem:</p>
  
  <pre><code>&gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; l = lambda i, value: i*v
  &gt;&gt;&gt; y = np.vectorize(l)
  &gt;&gt;&gt; y(range(10))
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2755, in __call__
      return self._vectorize_call(func=func, args=vargs)
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2825, in _vectorize_call
      ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2785, in _get_ufunc_and_otypes
      outputs = func(*inputs)
  TypeError: &lt;lambda&gt;() missing 1 required positional argument: 'value'
  &gt;&gt;&gt; y(enumerate(range(10)))
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2755, in __call__
      return self._vectorize_call(func=func, args=vargs)
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2825, in _vectorize_call
      ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args)
    File "/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py", line 2785, in _get_ufunc_and_otypes
      outputs = func(*inputs)
  TypeError: &lt;lambda&gt;() missing 1 required positional argument: 'value'
  </code></pre>
  
  <p>Is there anything like <code>fromiter</code> that supports this, but is faster with large inputs, like vectorize?</p>