BUG: set the needs_api variable in np.where