[SciPy-dev] openopt example mmp_1.py
dmitrey
dmitrey.kroshko@scipy....
Sun Feb 3 02:53:02 CST 2008
Then I guess something have been changed in numpy (I have 1.0.3)
here's full getCorrectInd() code:
from numpy import *
....
def getCorrectInd(p, ind):
if ind is not None:
if type(ind) in [int, int32, int64]: return [ind]
elif type(ind) == ndarray: return atleast_1d(ind).tolist()
elif type(ind) not in (list, tuple):
p.err('incorrect func index type!')
else: return ind
else: return None
So I can't understand why line "if type(ind) in [int, int32, int64]"
Maybe ind32 is no longer available in recent numpy?
Could you check
from numpy import *
a = int32(15)
Regardds, D.
> Hi Dmitrey,
>
> I have installed openopt from scratch. However the problem
> persists.
> The output of print type(ind) is
>
> <type 'numpy.int32'>
>
> Nils
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
>
>
More information about the Scipy-dev
mailing list