[Numpy-discussion] Bug in np.records?

Ralf Gommers ralf.gommers@gmail....
Sat Apr 6 10:30:06 CDT 2013


On Wed, Mar 20, 2013 at 2:57 PM, Pierre Barbier de Reuille <
pierre.barbierdereuille@gmail.com> wrote:

> Hey,
>
> I am trying to use titles for the record arrays. In the documentation, it
> is specified that any column can set to "None". However, trying this fails
> on numpy 1.6.2 because in np.core.records, on line 195, the "strip" method
> is called on the title object. This is really annoying. Could we fix this
> by replacing line 195 with:
>
>
>     self._titles = [n.strip() if n is not None else None for n in
> titles[:self._nfields]]
>
> ?
>

That sounds reasonable. Ideally you'd send a pull request for this,
including a regression test. Otherwise providing a self-contained example
that can be turned into a test would help.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130406/7de26834/attachment.html 


More information about the NumPy-Discussion mailing list