I have a list of coordinates among other things, I want to delete the number of objects I have in, say, quadrant I. I tried using np.delete, but perhaps my loop is wrong since it only deletes one single object. Here's what I have so far:
import sys
import os
import numpy as np
from pylab import *
import scipy
def get_distance(x,y,x_center,y_center):
d = (x - x_center)**2 + (y - y_center)**2
d = sqrt(d)
return d
dataA=np.genfromtxt('match.txt')
c1=dataA[:,0]
c2=dataA[:,1]
d1=dataA[:,2]
d2=dataA[:,3]
for i in xrange(len(c1)):
if c1[i] >= 0 and c1[i] <= 2288 and c2[i] >= 2288 and c2[i] <= 4576:
new_a = np.delete(c1,i)
new_b = np.delete(c2,i)