2013-05-07 1 views
-1
>>> dd=special.kv(0,Raster("adiff_C1.tif")) 
Runtime error <type 'exceptions.TypeError'>: ufunc 'kv' not supported for the input  types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe' 

파이썬 2.6 scipy-0.7.1-win32에서-superpack - python2.6 NumPy와-1.6.1-win32에서-superpack - python2.6 ARCGIS 10라 스터에 특수 기능을 사용하는 방법이 있습니까?

+0

좋은 질문을 공식화하십시오. 무슨 일이 벌어지고 있는지 이해할 수있는 방법은 없습니다. 일어나고있는 일과 찾고있는 것을 추가하십시오. 사람들이 당신을 쉽게 도울 수있는 이런 식으로. – aimbire

답변

0

당신은 convert your Raster object to a numpy array해야합니다. 그러면 scipy.special.kv은 잘 작동합니다.

In [9]: x = numpy.array([[1,2,3],[4,5,6]]) 

In [10]: x 
Out[10]: 
array([[1, 2, 3], 
     [4, 5, 6]]) 

In [11]: special.kv(0, x) 
Out[11]: 
array([[ 0.42102444, 0.11389387, 0.0347395 ], 
     [ 0.01115968, 0.0036911 , 0.00124399]]) 
+0

답변 해 주셔서 감사합니다. 위대한 작품 –

관련 문제