Re: [Numpy-discussion] isbuiltin - failure of understanding

2009-02-24 Thread Matthew Brett
Hi, > The variable-length string dtypes are not builtin. The user-defined > lengths make them user-defined dtypes. Right - but I was failing to understand, from the code, how '0' rather than '2' could result. Have I missed something? > If you want a real kick in the pants, try playing with dtyp

Re: [Numpy-discussion] isbuiltin - failure of understanding

2009-02-24 Thread Robert Kern
On Tue, Feb 24, 2009 at 15:04, Matthew Brett wrote: > Hi, > > I was just trying to write a docstring for np.dtype.isbuiltin, when I > realized I didn't understand it. > > As far as I can see, isbuitin should return: > > 0 for structured array dtypes > 1 for types compiled into numpy > 2 for extens

[Numpy-discussion] isbuiltin - failure of understanding

2009-02-24 Thread Matthew Brett
Hi, I was just trying to write a docstring for np.dtype.isbuiltin, when I realized I didn't understand it. As far as I can see, isbuitin should return: 0 for structured array dtypes 1 for types compiled into numpy 2 for extension types using the numpy C-API type extension machinery. Here's the