FYI: Numeric makes arrays of anything. Indeed, when given a list of items to use to construct an array, it falls back to "Object" as the typecode of the result if the items don't have compatible types. (I.e., Numeric.array([1,2.]) has typecode Numeric.Float, but Numeric.array([1, None]) would be typecode Numeric.PyObject. (The Numeric typecodes are a superset or the same as the ones in Python's array class, I think). If indeed PyInt_Check would identify a bool as an integer, we are either ok or we can be made ok as far as the constructor goes, in that Numeric.array([1,True]) will end up as typcode Numeric.Int; but so would Numeric.array([True,False]). And as I said, this is going to cause several new "well it is screwed up but take it or leave it" entries into the manual. E.g., x=Numeric.array([True,False]); print x[0] will end up printing 1, not True.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4