1d
awarded Nice Answer
May
18
comment how to get derivatives from 1D interpolation
Re why: interp1d is using a spline fit for the quadratic and/or cubic modes anyway. The specific spline fitting routine is different, and there is a lot going on in interp1d itself.
May
12
comment Vectorize a Newton method in Python/Numpy
Actually, you can iterate unconverged components only by using a boolean array mask = dx < eps: x[mask] -= v[mask] / dv[mask].
May
12
comment Vectorize a Newton method in Python/Numpy
@InsideLoop: the best you can do with the vectorized approach is something along the lines of while (dx < eps).all(), where both dx and eps are arrays. This indeed iterates all components as long as any one of them has not converged.
May
12
answered Vectorize a Newton method in Python/Numpy
May
12
comment How does the stats.gaussian_kde method calcute the pdf?
there's an atleast_2d call right in the beginning. In general, best ask an actual, separate question.
May
12
answered How does the stats.gaussian_kde method calcute the pdf?
May
11
answered Accessing elements in coo_matrix
May
8
awarded Popular Question
May
1
answered Hard copying dicts in a list
Apr
14
comment Cubic spline interpolation get coefficients
@paul23 for proofs, see eg books of de Boor or Lyche or Schumaker
Apr
13
revised Cubic spline interpolation get coefficients
added 364 characters in body
Apr
13
revised Cubic spline interpolation get coefficients
added 466 characters in body
Apr
13
comment Cubic spline interpolation get coefficients
Of course you can express a cubic interpolating spline in the b-spline basis. @Dux see my edited answer.
Apr
13
awarded Notable Question
Apr
12
revised scipy probability density function not giving correct value
added 107 characters in body
Apr
12
comment scipy probability density function not giving correct value
No. PDF must integrate to one, that's it. There is no restriction of the value of PDF at any particular point. For instance, think of a uniform distribution on (a, b).
Apr
12
comment scipy probability density function not giving correct value
Wikipedia has an explicit formula
Apr
12
answered scipy probability density function not giving correct value
Apr
10
comment Errors about using scipy.stats.uniform
In general, best avoid blank import scipy, import the submodule you actually need.
1 2 3 4 5