[Numpy-discussion] Fastest way of distinguish a numpy scalar of a python scalar?
haase at msg.ucsf.edu
Tue Oct 3 12:24:28 CDT 2006
a noticed the underscore in "numpy.string_" ...
I thought the underscores were removed in favour of handling the
"from numpy import *" separately via the __all__ variable.
Is this done only for *some* members of numpy ?
(sorry for hijacking your thread ...)
On Tuesday 03 October 2006 09:55, Francesc Altet wrote:
> I thought that numpy.isscalar was a good way of distinguising a numpy
> from a python scalar, but it seems not:
> >>> numpy.isscalar(numpy.string_('3'))
> >>> numpy.isscalar('3')
> Is there an easy (and fast, if possible) way to check whether an object is
> a numpy scalar or a python one?
More information about the Numpy-discussion