scipy

Python library for mathematics, science, and engineering computations

brewmacoslinux
Try with needOr install directly
Source

About

Software for mathematics, science, and engineering

Examples

solve systems of linear equations$ python3 -c "from scipy.linalg import solve; import numpy as np; A = np.array([[3, 1], [1, 2]]); b = np.array([9, 8]); print(solve(A, b))"
perform statistical tests and calculations$ python3 -c "from scipy.stats import ttest_ind; import numpy as np; a = np.array([1, 2, 3]); b = np.array([4, 5, 6]); print(ttest_ind(a, b))"
interpolate or smooth data points$ python3 -c "from scipy.interpolate import interp1d; import numpy as np; x = np.array([0, 1, 2]); y = np.array([0, 1, 4]); f = interp1d(x, y); print(f(0.5))"
compute Fourier transform for signal processing$ python3 -c "from scipy.fft import fft; import numpy as np; signal = np.array([1, 2, 3, 4]); print(fft(signal))"
optimize functions and minimize errors$ python3 -c "from scipy.optimize import minimize; import numpy as np; result = minimize(lambda x: (x-3)**2, x0=0); print(result.x)"