[SciPy-dev] openopt example mmp_1.py

Stefan van der Walt stefan at sun.ac.za
Mon Feb 4 01:18:54 EST 2008


Hi Dmitrey

On Sun, Feb 03, 2008 at 11:39:02AM +0200, dmitrey wrote:
> "if type(ind) in [int, int32, int64]: return [ind]"

'issubdtype' does the checking you require:

import numpy as np
np.issubdtype(ind,int)

Regards
Stéfan



More information about the SciPy-Dev mailing list