packbits / unpackbits bugs or misfeatures?

Hello all, numpy.unpackbits has a docstring that states that it returns a boolean array, but the function instead returns a uint8 array. Should I enter this in trac as a documentation bug or a functionality bug? Also, numpy.packbits will not accept a bool-typed array as input (only scalar-typed arrays) -- should it have this ability, for symmetry with unpackbits? (Assuming that unpackbits should indeed unpack into bool arrays...) Zach

Hey Zach 2008/8/7 Zachary Pincus <zachary.pincus@yale.edu>:
Hello all,
numpy.unpackbits has a docstring that states that it returns a boolean array, but the function instead returns a uint8 array. Should I enter this in trac as a documentation bug or a functionality bug?
Would you mind fixing up the docs on the documentation editor? Thanks! Stéfan

Hello all,
numpy.unpackbits has a docstring that states that it returns a boolean array, but the function instead returns a uint8 array. Should I enter this in trac as a documentation bug or a functionality bug?
Would you mind fixing up the docs on the documentation editor?
Except that it would kind of make more sense, at least to me, for unpackbits to return a boolean array, and packbits to take boolean arrays. I could try to look into fixing the code instead of the docs, if others agree. Otherwise I'll fix the docs. Maybe that's better from an API-breakage standpoint anyway, regardless of what "makes sense to me"... Zach
participants (2)
-
Stéfan van der Walt
-
Zachary Pincus