Top "Numpy" questions

NumPy is an extension of the Python language that adds support to large multidimensional arrays and matrixes, along with a large library of high-level mathematical functions for operations with these arrays.

Dump a NumPy array into a csv file

Is there a way to dump a NumPy array into a CSV file? I have a 2D NumPy array and …

python arrays csv numpy
Concatenate a NumPy array to another NumPy array

I have a numpy_array. Something like [ a b c ]. And then I want to concatenate it with another NumPy …

python numpy
Is there a NumPy function to return the first index of something in an array?

I know there is a method for a Python list to return the first index of something: >>> …

python arrays numpy
How to print the full NumPy array, without truncation?

When I print a numpy array, I get a truncated representation, but I want the full array. Is there any …

python arrays numpy options output-formatting
How to normalize an array in NumPy?

I would like to have the norm of one NumPy array. More specifically, I am looking for an equivalent version …

python numpy scikit-learn statistics normalization
List to array conversion to use ravel() function

I have a list in python and I want to convert it to an array to be able to use …

python arrays list numpy
How to count the occurrence of certain item in an ndarray?

In Python, I have an ndarray y that is printed as array([0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1]) I'm trying to count how many 0s and …

python numpy multidimensional-array count
pandas create new column based on values from other columns / apply a function of multiple columns, row-wise

I want to apply my custom function (it uses an if-else ladder) to these six columns (ERI_Hispanic, ERI_AmerInd_…

python pandas numpy apply
Saving a Numpy array as an image

I have a matrix in the type of a Numpy array. How would I write it to disk it as …

python image numpy
python numpy ValueError: operands could not be broadcast together with shapes

In numpy, I have two "arrays", X is (m,n) and y is a vector (n,1) using X*y I …

python numpy