Python library for mathematics, science, and engineering computations
Software for mathematics, science, and engineering
$ 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))"$ 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))"$ 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))"$ python3 -c "from scipy.fft import fft; import numpy as np; signal = np.array([1, 2, 3, 4]); print(fft(signal))"$ python3 -c "from scipy.optimize import minimize; import numpy as np; result = minimize(lambda x: (x-3)**2, x0=0); print(result.x)"