Fehler in scipy interp1d

Verstehe ich nicht das Ergebnis berichtet interp1d. Ich erhalte NAN, wo ich erhalten soll zahlen.

In [131]: bb
Out[131]: 
array([ 0.        ,  1.80286595,  1.87443683,  2.70410611,  3.02764722,
        3.11305985,  3.11534355,  3.18695351,  3.20693444])

In [132]: alphas1
Out[134]: 
array([  3.80918778e+00,   2.06547222e+00,   1.99234191e+00,
         7.55942418e-01,   2.56971574e-01,   1.05144676e-01,
         9.30852046e-02,   1.52574183e-02,   1.23664407e-07])

In [135]: bb.shape
Out[135]: (9,)

In [136]: alphas1.shape
Out[140]: (9,)

In [141]: pol = interp1d(alphas1, bb, bounds_error=False)

In [149]: pol(pol.x)
Out[149]: array([ nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan,  nan]) # I was expecting to receive nan only at the borders.
Welche version? Gibt die richtige Antwort np.array([ 3.20693444, 3.18695351, ... im scipy 0.14.0 numpy 1.8.1
In [25]: np.version.version Aus[29]: '1.8.1' In [30]: scipy.version.version Aus[44]: '0.13.3'
Update scipy es könnte gehen Weg.
Dank nicht, es funktioniert!

InformationsquelleAutor Donbeo | 2014-08-11

Schreibe einen Kommentar