This is a complete reimplementation of the 'select' function in numpy to fix long-standing bugs, improve speed in a common use case and improve internal documentation.