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.

How to convert 2D float numpy array to 2D int numpy array?

How to convert real numpy array to int numpy array? Tried using map directly to array but it did not …

python numpy
Replace all elements of Python NumPy Array that are greater than some value

I have a 2D NumPy array and would like to replace all values in it greater than or equal to …

python arrays numpy replace conditional-statements
How do I check which version of NumPy I'm using?

How can I check which version of NumPy I'm using? (FYI this question has been edited because both the question …

python numpy version
Moving average or running mean

Is there a SciPy function or NumPy function or module for Python that calculates the running mean of a 1D …

python numpy scipy moving-average
Calculating Pearson correlation and significance in Python

I am looking for a function that takes as input two lists, and returns the Pearson correlation, and the significance …

python numpy statistics scipy
Plotting a 2D heatmap with Matplotlib

Using Matplotlib, I want to plot a 2D heat map. My data is an n-by-n Numpy array, each with a …

python numpy matplotlib
What does .shape[] do in "for i in range(Y.shape[0])"?

I'm trying to break down a program line by line. Y is a matrix of data but I can't find …

python numpy matplotlib scipy
How do I compute derivative using Numpy?

How do I calculate the derivative of a function, for example y = x2+1 using numpy? Let's say, I want the …

python math numpy
What does numpy.random.seed(0) do?

What does np.random.seed do in the below code from a Scikit-Learn tutorial? I'm not very familiar with NumPy's …

python numpy
NumPy array initialization (fill with identical values)

I need to create a NumPy array of length n, each element of which is v. Is there anything better …

python arrays numpy