[Numpy-discussion] efficient function calculation between two matrices
Tue Feb 17 04:09:12 CST 2009
I am trying to calculate the results of a function between two matrices:
(170, 481, 2)
Where F contains lat/lon pairs and T contains 481 lat/lon pairs for 170
trajectories of length 481
I want a new array of shape
containing the results of my distance function:
""" returns great circle distance"""
Is there a way to do this without the use of loops?
I'm thinking something along the lines of:
distances = [[gcd(f,f,t,t]) for f in F] for t in T]
But obviously this doesn't work...
View this message in context: http://www.nabble.com/efficient-function-calculation-between-two-matrices-tp22054148p22054148.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
More information about the Numpy-discussion