Tag: scipy

50 votes
3 answers
1K views
How to implement band-pass Butterworth filter with Scipy.signal.butter

UPDATE: I found a Scipy Recipe based in this question! So, for anyone interested, go straight to: Contents ยป

avatar
Rufus
0 1 0 9
asked 07 September, 2021
47 votes
4 answers
2.3K views
shuffle vs permute numpy

What is the difference between numpy.random.shuffle(x) and numpy.random.permutation(x)? I have read the doc p

avatar
Scot
0 1 0 9
asked 07 September, 2021
56 votes
4 answers
1.2K views
MatPlotLib: Multiple datasets on the same scatter plot

I want to plot multiple data sets on the same scatter plot: cases = scatter(x[:4], y[:4], s=10, c='b&apo

avatar
Lynette
0 1 0 9
asked 07 September, 2021
63 votes
9 answers
523 views
ImportError: cannot import name NUMPY_MKL

I am trying to run the following simple code import scipy scipy.test() But I am getting the following erro

avatar
Emilia
0 1 0 9
asked 07 September, 2021
58 votes
9 answers
2.3K views
Quantile-Quantile Plot using SciPy

How would you create a qq-plot using Python? Assuming that you have a large set of measurements and are using

avatar
Dario
0 1 0 9
asked 07 September, 2021
55 votes
2 answers
2.6K views
Two-sample Kolmogorov-Smirnov Test in Python Scipy

I can't figure out how to do a Two-sample KS test in Scipy. After reading the documentation scipy kstest

avatar
Chelsea
0 1 0 9
asked 07 September, 2021
58 votes
4 answers
2.7K views
How to transform numpy.matrix or array to scipy sparse matrix

For SciPy sparse matrix, one can use todense() or toarray() to transform to NumPy matrix or array. What are th

avatar
Patsy
0 1 0 9
asked 07 September, 2021
62 votes
13 answers
1.2K views
ImportError: No module named scipy

I am using Python 2.7 and trying to get PyBrain to work. But I get this error even though scipy is installed

avatar
Eddie
0 1 0 9
asked 07 September, 2021
69 votes
12 answers
2.1K views
scipy: savefig without frames, axes, only content

In numpy/scipy I have an image stored in an array. I can display it, I want to save it using savefig without a

avatar
Robyn
0 1 0 9
asked 07 September, 2021
63 votes
9 answers
633 views
How to calculate probability in a normal distribution given mean & standard deviation?

How to calculate probability in normal distribution given mean, std in Python? I can always explicitly code my

avatar
Forrest
0 1 0 9
asked 07 September, 2021
52 votes
7 answers
656 views
Plotting a fast Fourier transform in Python

I have access to NumPy and SciPy and want to create a simple FFT of a data set. I have two lists, one that is

avatar
Deedee
0 1 0 9
asked 07 September, 2021
65 votes
11 answers
1.5K views
Principal component analysis in Python

I'd like to use principal component analysis (PCA) for dimensionality reduction. Does numpy or scipy alr

avatar
Wei
0 1 0 9
asked 07 September, 2021
48 votes
7 answers
1K views
Histogram Matplotlib

So I have a little problem. I have a data set in scipy that is already in the histogram format, so I have the

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
55 votes
1 answers
347 views
How can I perform two-dimensional interpolation using scipy?

This Q&A is intended as a canonical(-ish) concerning two-dimensional (and multi-dimensional) interpolatio

avatar
Roger
0 1 0 9
asked 07 September, 2021
56 votes
8 answers
787 views
How to calculate cumulative normal distribution?

I am looking for a function in Numpy or Scipy (or any rigorous Python library) that will give me the cumulativ

avatar
Wei
0 1 0 9
asked 07 September, 2021
57 votes
6 answers
1.5K views
binning data in python with scipy/numpy

is there a more efficient way to take an average of an array in prespecified bins? for example, i have an arra

avatar
Bryan
0 1 0 9
asked 07 September, 2021
55 votes
21 answers
796 views
Can't install Scipy through pip

When installing scipy through pip with : pip install scipy Pip fails to build scipy and throws the followin

avatar
Lawanda
0 1 0 9
asked 07 September, 2021
61 votes
13 answers
536 views
ImportError in importing from sklearn: cannot import name check_build

I am getting the following error while trying to import from sklearn: >>> from sklearn import svm T

avatar
Alphonso
0 1 0 9
asked 07 September, 2021
49 votes
5 answers
1.3K views
How to check BLAS/LAPACK linkage in NumPy and SciPy?

I am builing my numpy/scipy environment based on blas and lapack more or less based on this walk through. Wh

avatar
Freida
0 1 0 9
asked 07 September, 2021
56 votes
9 answers
699 views
Numpy Resize/Rescale Image

I would like to take an image and change the scale of the image, while it is a numpy array. For example I hav

avatar
Tuan
0 1 0 9
asked 07 September, 2021