Python function which will call a 1D vector values
Question: I have the next sequence of numbers of A array( is an array 1D )

  1. -1.7654142212e-06
  2. 7.0737426918e-07
  3. 1.63230254789e-06 
  4. 1.88255344022e-06 
  5. 5.00966829007e-06 
  6. 1.88631278169e-06 
  7. -4.08751917695e-06 
  8. 9.12971786351e-07 
  9. 5.33615185204e-06 
  10. -1.01338496378e-05

are 100 values, just say that are only 10.

I need a function that will call these numbers.

EDIT

using x, x= np.linspace(0,1000,10)

I used scipy.interpolate.interp1d and its not working so good...

EDIT

the interpolation take the first and last value, and do an aproximation. In my
case the values are too small, and accuracy is important. Also, A values are
changing on each x step, enough to cause an error after few iterations.

So if our array is

A = ((-1.7654142212e-06 , ....,-1.01338496378e-05 ))`

I need a function to work like that:

EDIT

e.a. A_FUNCTION(0) = -1.7654142212e-06 ....

to call any value I want, without call the approximation of the value, (for a
specific #number of x) inside another function on the main or a second script.


Answer: why don't you just create a function that takes two inputs: an array, and
number

    
    
    In [15]: A
    Out[15]: 
    array([-4611686018427387904, -4611686018427387904,                    7,
                              0, -4611686018427387904,  5764616295532855496,
           -4611686018427387899, -4611686018427387904,                    4,
               1407374883553280])
    
    In [16]: def grab_item(array,number):
       ....:     return array[number]
       ....: 
    
    In [17]: grab_item(A,8)
    Out[17]: 4
    

After the multitude of comments, here is an example of what I believe you want
through using this function:

    
    
    In [24]: x = np.linspace(0,1000,100)
    
    In [25]: grab_item(x,9)
    Out[25]: 90.909090909090907
    

