ScattPy / scikits.scattpy

Light Scattering Methods for Python
scattpy.github.com
14 stars 3 forks source link

Methods.py error (windows 10) #15

Open bclima opened 7 years ago

bclima commented 7 years ago

I try to following it: http://scattpy.github.io/docs/user/getting_started.html Erro 1 solved (I think):

from scikits.scattpy import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\scikits\scattpy\__init__.py", line 3, in <module>
    from methods import svm,ebcm,pmm
  File "C:\Python27\lib\site-packages\scikits\scattpy\methods.py", line 3, in <module>
    import laboratory
  File "C:\Python27\lib\site-packages\scikits\scattpy\laboratory.py", line 1, in <module>
    import core
  File "C:\Python27\lib\site-packages\scikits\scattpy\core.py", line 4, in <module>
    from scipy.misc.common import factorial
ImportError: cannot import name factorial

import scipy scipy.__version__

'0.19.0'

solution: change scipy.misc.common import factorial to scipy.misc import factorial

but still not working.

from scikits.scattpy import *
from numpy import *
P = ProlateSpheroid(ab=4., xv=2., m=1.33+0.2j)
LAB = Lab(P, alpha=pi/4)
RES = ebcm(LAB)

************************************************************
m1=1, alpha=45.0
homogeneous prolate spheroid with ab=4.0, xv=2.0, m=(1.33+0.2j)

************************************************************

Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    RES = ebcm(LAB)
  File "C:\Python27\lib\site-packages\scikits\scattpy\methods.py", line 50, in meth
    if lab.particle.layers[0].shape.nrange == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

How I can solve it? Any help ?

:D