# Tag Archives: Python numpy-Indexing

## Accessing Data Along Multiple Dimensions Arrays in Python Numpy

NumPy (Numerical Python) is a Python library that comprises of multidimensional arrays and numerous functions to perform various mathematical and logical operations on them. NumPy… Read More »

## Indexing Multi-dimensional arrays in Python using NumPy

NumPy is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package… Read More »

## Python | Numpy np.triu_indices

With the help of np.triu_indices() method, we can get the indices for the upper triangle of an [n, m] array by using np.triu_indices() method. Syntax… Read More »

## numpy.where() in Python

numpy.where(condition[, x, y]) function returns the indices of elements in an input array where the given condition is satisfied. Parameters: condition : When True, yield… Read More »

## numpy.nonzero() in Python

numpy.nonzero()function is used to Compute the indices of the elements that are non-zero. It returns a tuple of arrays, one for each dimension of arr,… Read More »

## numpy.diag_indices() in Python

numpy.diag_indices(n, n_dim = 2) : Returns indices in order to access the elements of main diagonal of a array with minimum dimension = 2. Returns… Read More »

## numpy.place() in Python

numpy.place(array, mask, vals) : make changes in the array according the parameters – conditions and value(uses first N-values to put into array as per the… Read More »

## numpy.compress() in Python

numpy.compress(condition, array, axis = None, out = None) : Return selected slices of an array along mentioned axis, that satisfies an axis. Parameters : condition… Read More »

## numpy.put() in Python

numpy.put(array, indices, p_array, mode = ‘raise’) : Replaces specific elements of an array with given values of p_array. Array indexed works on flattened array. Parameters… Read More »

## numpy.take() in Python

numpy.take(array, indices, axis = None, out = None, mode =’raise’) : Return elememts from array along the mentioned axis and indices. Parameters : array :… Read More »

## Basic Slicing and Advanced Indexing in NumPy Python

Prerequisites : Numpy in Python Introduction NumPy or Numeric Python is a package for computation on homogenous n-dimensional arrays. In numpy dimensions are called as… Read More »