Counting Integers

| categories: Transcripts

Today we talked about counting the number of occurences of each different integer in an array of integers. We started with the assumption that the values ranged from 0 through 5. The challenge was to write a function countInts(A) that returned an array. For example, countInts(np.array([1,3,2,5,2,1]) should return np.array([0,2,2,1,0,1]) because 0 doesn't occur at all, 1 occurs twice, 2 occurs twice, 3 occurs once, 4 not at all, and 5 once. If you weren't in class you should think about the problem a little before reading on. You'll have to solve problems like this on the next test and on the final exam.

more...




Computing Distances

| categories: Transcripts

Today we talked about finding pairs of points with constraints on their distance. This will be very helpful for your assignment 4.

more...








« Previous Page -- Next Page »