## cjones903's Profile User Rating:

Reputation: 1 Apprentice
Group:
Members
Active Posts:
18 (0.05 per day)
Joined:
28-December 12
Profile Views:
260
Last Active:
Mar 26 2013 06:55 PM
Currently:
Offline

### Previous Fields

Dream Kudos:
0
cjones903 has not set their status

1. #### In Topic: Comparing 2 Rows, Slices

Posted 6 Feb 2013

Other than not being very pythonic or elegant, do you guys forsee a problem with this?

```def xmax(r):
x1 = (r[0][0])
x2 = (r[1][0])
xMax = max(x1,x2)
return(xMax)

def xmin(r):
x1 = (r[0][0])
x2 = (r[1][0])
xMin = min(x1,x2)
return(xMin)

```
2. #### In Topic: Comparing 2 Rows, Slices

Posted 6 Feb 2013

@Darek, I like the zip idea, but I need the actual numerical values for each. @andrewsw, the axis = 0 does indeed return an entire row. The axis = 1 returns an entire column.
3. #### In Topic: Best Way to Take Values from a Numpy Array, Two at a Time

Posted 4 Feb 2013

I've gotten a little further, but its a TOTAL KLUGE!

```import numpy as np
#from collections import deque

'''
Created on Jan 27, 2013

@author: cameron
'''

f ='/Users/cameron/Documents/workspace/findMinMax/crapc.txt'
x,y,z = np.loadtxt(f, unpack=True, usecols=(1,2,3), ndmin = 2)

maxZ = max(z)
minZ = min(z)
print("Maximum Z value: " + str(maxZ))
print("Minimum Z value: " + str(minZ))

matrix = [x,y,z]
'''[[row[i] for row in matrix] for i in range(3)]
#print(matrix[2][3])
print()'''

xyz = []
for i in range(len(x)):
if (matrix[2][i]) < 2:
xyz = (matrix[0][i], matrix[1][i], matrix[2][i])
xyz2= (matrix[0][i-1], matrix[1][i-1], matrix[2][i-1])
print(xyz2)
```
4. #### In Topic: Best Way to Take Values from a Numpy Array, Two at a Time

Posted 3 Feb 2013

I shall try. So far, all I've gotten is the text file read into a 'matrix'. I want to then take two complete rows from the top ( I was thinking LIFO queue, but I'm a newbie, so that is looking daunting). I would then want to use the values in those rows to work on, and then move to the next two values. From time to time, I may have to refer back to previous values though.
5. #### In Topic: Clearing an ArrayList within a method

Posted 25 Jan 2013

This is the EXACT error I'm getting.:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at wyby.getZMM(wyby.java:182)
at wyby.main(wyby.java:30)

Member Title:
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

E-mail: