array-indexing

NumPy 3D Array: Get items from a list of 2D co-ordinates

NumPy 3D Array: Get items from a list of 2D co-ordinates Question: I have a numpy array that looks like follows. img = [ [ [135. 100. 72.], [124. 102. 63.], [161. 67. 59.], [102. 92. 165.], [127. 215. 155.] ], [ [254. 255. 255.], [216. 195. 238.], [109. 200. 141.], [ 99. 141. 153.], …

Total answers: 2

The difference between double brackets vs single square brackets in python

The difference between double brackets vs single square brackets in python Question: I am trying to Sort the array by the second row. For n1, I use two square brackets [][] whereas for n2 I use a single square bracket [,]. I am trying to understand why do I get different results? Thank you in …

Total answers: 1