BUG: properly handle references of objects in new np.where

Objects must go over the objects copyswap function for correct reference
counting.