[SciPy-dev] openopt example mmp_1.py

Stefan van der Walt stefan@sun.ac...
Mon Feb 4 00:18:54 CST 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