[SciPy-dev] Is "bool" the right name?
Travis Oliphant
oliphant at ee.byu.edu
Mon Oct 31 11:24:38 CST 2005
Todd Miller wrote:
>Trying to add some newcore compatibility to numarray, I bowled through
>the obvious name collision between the new numarray "bool" and the
>Python scalar type "bool." The name collision is easy enough to work
>around in the numarray internals, but it occurred to me that "bool8"
>might be a better name since it is more explicit, consistent with the
>other type names, and clearly resolves the recurring question "Is this
>a 1-bit bool or not?".
>
>So, while newcore is still young, does it make sense to rename "bool"
>to "bool8"?
>
>
Actually, I renamed everything that was conflicting with standard Python
types with an appended underscore.
When used as a data type, the standard Python scalars actually work to
identify what is desired as well.
So dtype=bool_ and dtype=bool produce the same result, but of course
bool_(...) produces an array of bools
and
bool() produces a single Python bool
-Travis
More information about the Scipy-dev
mailing list