[SciPy-user] Arrayfns in numpy?
Tue Mar 6 04:54:19 CST 2007
Thanks for the reply.
I don't want to depend on scipy for a small task like this. I want to keep
I looked at the searchsorted function, but don't see how it would be useful.
My data is not regularly spaced. It is X-ray diffraction data in which each
intensity has been shifted slightly. I am currently using arrayfns from
Numeric to get data with regular spacing. Could you give more information on
how to interpolate the data? I don't know where to start.
As an aside, here's some things in Numeric that aren't in numpy. Is this
oversight, or are there no plans to implement them?
1. arrayfns module
2. UserArray module with UserArray class (comparible to UserDict, UserList).
On 3/5/07, Alok Singhal <email@example.com> wrote:
> On 05/03/07: 20:24, Stephen Kelly wrote:
> > Is there some other way I should be doing interpolation using numpy,
> > or is the omission of arrayfns an oversight?
> You could use the functions in scipy.interpolate. For linear
> interpolation, use something like:
> from scipy.interpolate import interp1d
> # x, y are the original data values
> intp = interp1d(x, y)
> # xx is an array of new x values for which to interpolate (or just a
> # scalar)
> yy = intp(xx)
> If you can't use scipy, then it shouldn't be too hard to write your
> own linear interpolation function. You might find searchsorted()
> function useful in that case (in case your original x data is not
> regularly spaced).
> Alok Singhal * *
> Graduate Student, dept. of Astronomy * * *
> University of Virginia
> http://www.astro.virginia.edu/~as8ca/ * *
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user