It’s easier than you think:
>>> import numpy
>>> A = numpy.array(((1,2),(3,4)))
>>> idx = (0,0)
>>> A[idx]
1
More Related Contents:
- ValueError: setting an array element with a sequence
- Numpy `logical_or` for more than two arguments
- Converting numpy dtypes to native python types
- Concatenate a NumPy array to another NumPy array
- ImportError: numpy.core.multiarray failed to import
- Fast replacement of values in a numpy array
- Link ATLAS/MKL to an installed Numpy
- Concatenate two NumPy arrays vertically
- Recursive definitions in Pandas
- Integer overflow in numpy arrays
- Most efficient way to reverse a numpy array
- numpy is already installed with Anaconda but I get an ImportError (DLL load failed: The specified module could not be found)
- How to specify upper and lower limits when using numpy.random.normal
- Is freeing handled differently for small/large numpy arrays?
- Are NumPy’s math functions faster than Python’s?
- NumPy chained comparison with two predicates
- Using datetime as ticks in Matplotlib
- Plot the x-axis as a date
- How to count values in a certain range in a Numpy array?
- Numpy sub-array assignment with advanced, mixed indexing
- Numpy difference between neighboring elements
- new pythonic style for shared axes square subplots in matplotlib?
- One Hot Encoding using numpy [duplicate]
- Is there a numpy/scipy dot product, calculating only the diagonal entries of the result?
- How can I draw lines into numpy arrays?
- Fast interpolation of grid data
- Get the indices of N highest values in an ndarray
- Interweaving two NumPy arrays efficiently
- How to convert a 3d numpy array to 2d
- Numpy.dtype has the wrong size, try recompiling