python - How do I create a range that goes from the first row of a 2D matrix to the last row? -


i have matrix of dimensions nx2.
defining function this:

def overlap_test(r):     in range( ) 

i'm struggling write range arguments because matrix doesn't have fixed numbers; numbers within randomly generated. want general way of saying first row last row of matrix.

how want function iterate on range first row nth row??? don't know notation saying first row of matrix?

the function .shape can :

yourmatrix.shape 

this function return tuple (r, c), contains dimension of matrix. can derterminate last row of matrix, , range of function for.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -