[Numpy-discussion] Fastest way of distinguish a numpy scalar of a python scalar?
tim.hochberg at ieee.org
Tue Oct 3 12:27:13 CDT 2006
Francesc Altet wrote:
> I thought that numpy.isscalar was a good way of distinguising a numpy scalar
> from a python scalar, but it seems not:
> Is there an easy (and fast, if possible) way to check whether an object is a
> numpy scalar or a python one?
It looks like isinstance(x, numpy.generic) works, but I didn't test it
More information about the Numpy-discussion