scipy

Is it possible to install scipy under pypy?

落爺英雄遲暮 提交于 2021-02-04 13:08:15
问题 I created a virtualenv with pypy and tried to install scipy, but installation ended with the following error: distutils.errors.DistutilsError: Setup script exited with error: Command "cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include

Is it possible to install scipy under pypy?

微笑、不失礼 提交于 2021-02-04 13:07:51
问题 I created a virtualenv with pypy and tried to install scipy, but installation ended with the following error: distutils.errors.DistutilsError: Setup script exited with error: Command "cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include

Is it possible to install scipy under pypy?

泪湿孤枕 提交于 2021-02-04 13:07:19
问题 I created a virtualenv with pypy and tried to install scipy, but installation ended with the following error: distutils.errors.DistutilsError: Setup script exited with error: Command "cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include

Is it possible to install scipy under pypy?

醉酒当歌 提交于 2021-02-04 13:06:41
问题 I created a virtualenv with pypy and tried to install scipy, but installation ended with the following error: distutils.errors.DistutilsError: Setup script exited with error: Command "cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include

Implementation of the Gauss-Newton method from Wikipedia example

岁酱吖の 提交于 2021-02-04 12:36:07
问题 I'm relatively new to Python and am trying to implement the Gauss-Newton method, specifically the example on the Wikipedia page for it (Gauss–Newton algorithm, 3 example). The following is what I have done so far: import scipy import numpy as np import math import scipy.misc from matplotlib import pyplot as plt, cm, colors S = [0.038,0.194,.425,.626,1.253,2.500,3.740] rate = [0.050,0.127,0.094,0.2122,0.2729,0.2665,0.3317] iterations = 5 rows = 7 cols = 2 B = np.matrix([[.9],[.2]]) # original

Plotting stochastic processes in Python

安稳与你 提交于 2021-02-04 12:33:36
问题 Say I have a stochastic process defined between [0... N] , e.g. N=50 . For every location, I have several samples (e.g. m=100 samples) (representing my sampling distribution at each location). One way to look at this is as a numpy 2D array of size (m,N) . How can I plot this intuitively in matplotlib ? One possibility is to plot the process as a 1D plot along with an envelope of varying thickness and shade that captures the density of these distributions, something along the lines of what I

How to define LTI systems with Time delay in Scipy?

佐手、 提交于 2021-02-04 12:33:07
问题 The transfer function of an LTI system with time delay has a numerator term exp(-Td * s) where Td is the time delay. In Matlab, one could create such an LTI system in many ways (e.g. using the "s" operator and setting the exponential term directly or by setting the inputdelay outputdelay properties of tf objects.) However, I cannot find any way to do this in Scipy Signal LTI objects. I also checked the Python Control Systems Library, but still couldn't find a way. I do not want to use the

Different behaviour between MATLAB fmincon and scipy optimize minimize

a 夏天 提交于 2021-01-29 22:32:42
问题 I'm translating some code from MATLAB to python. This code simulate the behaviour of a model and I want to estimate parameters from it. The problem is that results obtained with python and with MATLAB are very different. I've tought it was related to the difference between the MATLAB's fmincon and the python scipy.optimize.minimize function, but according to this tutorial that I've found on youtube (https://www.youtube.com/watch?v=SwogAa1719M) the results are almost the same,so problems must

Scipy minimisation optimisation row-wise on DataFrame

不羁岁月 提交于 2021-01-29 18:41:12
问题 TYPO FIXEDD I need to perform a minimization optimisation for each timestep in my timeseries. The optimisation sets the price based on values in different columns across the row and a series of inequality constraints. My Dataframe has the following columns across time series of 48 years: ['CAPEX_TOT', 'CAPEX_R', 'CAPEX_WS', 'debt_BP', 'principal','interest', 'debt_service', 'debt_EP', 'OPEX', 'OPEX_R', 'OPEX_WS', 'DELIVERY_BAWSCA', 'DELIVERY_OTHER_DEMAND', 'DELIVERY_SAN_FRANCISCO_CITY',

Mac - No module named 'scipy'

眉间皱痕 提交于 2021-01-29 18:08:45
问题 I've tried everything but can't get Scipy to work. Installed Scipy via Homebrew, seemed to work fine - but then the error when trying to import it. Uninstalled, installed via pip3, no difference. Brew doctored, brew link (forced links for the unlinked kegs for Scipy AND python), no progress. Running on macOS Mojave (10.14.6). Numpy, matplotlib and much more is working fine. What am I missing here? I have two versions of python installed, but Scipy SHOULD be installed in python3.7 (which I am