outbox = pts[np.logical_not(inidx)]
rect = np.array([[bx1, by1], [bx1, by2], [bx2, by2], [bx2, by1], [bx1, by1]])
pyplot.plot(inbox[:, (0)], inbox[:, (1)], 'rx', outbox[:, (0)], outbox[:, (
    1)], 'bo', rect[:, (0)], rect[:, (1)], 'g-')
pyplot.show()
numpy filter points within bounding box