[Numpy-discussion] Detect subclass of ndarray

Anne Archibald peridot.faceted@gmail....
Fri Mar 23 23:37:24 CDT 2007

On 23/03/07, Charles R Harris <charlesr.harris@gmail.com> wrote:
> Anyone,
> What is the easiest way to detect in python/C if an object is a subclass of
> ndarray?

Um, how about isinstance or issubclass? (if you want strictness you
can look at whether x.__class__ is zeros(1).__class__)


More information about the Numpy-discussion mailing list