[SciPy-dev] openopt example mmp_1.py

dmitrey dmitrey.kroshko@scipy....
Sun Feb 3 03:39:02 CST 2008


Nils, I have updated numpy from svn (1.0.5.dev4767) , and all still works ok
Could you check via debugger or somehow else, why the case "numpy.int32" 
is not handled by the line 355 from objFunRelated.py:

"if type(ind) in [int, int32, int64]: return [ind]"
as far as I understand from the stack data you have attached, it goes to 
line 358 instead:
p.err('incorrect func index type!')

And/or, could anyone else update openopt from svn and run 
/examples/mmp_1.py ?

Regards, D.


Nils Wagner wrote:
> On Sun, 03 Feb 2008 10:53:02 +0200
>   dmitrey <dmitrey.kroshko@scipy.org> wrote:
>   
>> 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   
>>     
>>>> numpy.__version__
>>>>         
> '1.0.5.dev4766'
>   
>
> 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