Anne,
> I should have provided the link before, but this is very useful for
> answering this kind of question:
> http://www.scipy.org/Numpy_Functions_by_Category
Great link indeed, that complements well the example list:
http://www.scipy.org/Numpy_Example_List
Thanks again !
On 04/03/2008, Pierre GM <[EMAIL PROTECTED]> wrote:
> Anne,
>
> Thanks a lot for your suggestion. Something like
>
> >>>if axis is None:
> >>>return b.flat[a.argmin()]
> >>>else:
> >>> return numpy.choose(a.argmin(axis),numpy.rollaxis(b,axis,0))
>
> seems to do the trick fairly nicely i
Anne,
Thanks a lot for your suggestion. Something like
>>>if axis is None:
>>>return b.flat[a.argmin()]
>>>else:
>>> return numpy.choose(a.argmin(axis),numpy.rollaxis(b,axis,0))
seems to do the trick fairly nicely indeed. The other solutions you suggested
would require too much ad hoc ad
On 04/03/2008, Pierre GM <[EMAIL PROTECTED]> wrote:
> All,
> Let a & b be two ndarrays of the same shape. I'm trying to find the elements
> of b that correspond to the minima of a along an arbitrary axis.
> The problem is trivial when axis=None or when a.ndim=2, but I'm getting
> confused with
All,
Let a & b be two ndarrays of the same shape. I'm trying to find the elements
of b that correspond to the minima of a along an arbitrary axis.
The problem is trivial when axis=None or when a.ndim=2, but I'm getting
confused with higher dimensions: I came to the following solution that looks
At 03:28 PM 3/3/2008, Ann wrote:
> >Sounds familiar. If you have a good signal-to-noise ratio, you can get
> >subpixel accuracy by oversampling the irfft, or better but slower, by
> >using numerical optimization to refine the peak you found with argmax.
the S/N here is poor, and high data rates wo
Thank you for the input!
It sounds like Fourier methods will be fastest, by design, for sample
counts of hundreds to thousands.
I currently do steps like:
Im1 = get_stream_array_data()
Im2 = load_template_array_data(fh2)
##note: len(im1)==len(im2)
Ffft_im1=fftpack.rfft(Im1)
Ffft_im2=fftpack.rfft(
Lisandro Dalcin wrote:
> And yes, in
> my case the cummulative differences leaded to different iteration
> counts in a matrix-free Newton-Krylov method. Of course, the final
> answer was as as accurate as the tolerances for the nonlinear solver.
OK, so significant differences in iteration counts,
Damian Eads wrote:
> One used -mfpmath=sse, and the other, -mfpmath=387.
> Keeping them both
> the same cleared the discrepancy.
Oh yes! I think you got it...
On 3/3/08, Christopher Barker <[EMAIL PROTECTED]> wrote:
>
> Was it really a "significant" difference, or just noticeable? I hope
> not,
> Alan G Isaac wrote:
>> I never got a response to this:
>> http://projects.scipy.org/pipermail/scipy-dev/2008-February/008424.html>
>>
>> (Two different types claim to be numpy.int32.)
On Mon, 03 Mar 2008, "Travis E. Oliphant" apparently wrote:
> It's not a bug :-) There are two c-level types
Jeff,
> Is there a better way to tell if the individual fields are masked than
> accessing ._fieldmask?
That depends. If you need to access you mrecarray record by record (by rows),
yes you have to check the corresponding ._fieldmask. If instead you can
process your array field by field (by col
Hi,
I'm using an mrecarray in a situation where I need to replace the masked
values with default values which are not necessarily the same as the
fill value... Something like:
for field, mask in zip(row, row._fieldmask):
value = field if not mask else ...
...
Is there a better way to t
Just tried on a 32bit workstation (both CPU and OS): I get
an error, as before, using python2.5:
---
a.py:5: DeprecationWarning: struct integer overflow masking is deprecated
b=struct.pack("<10H",*a)
Traceback (most recent call last):
File "a.py", line 5, in
b=struct.pack("<10H",*a)
File
Hi,
this snippet is causing troubles:
---
import struct
import numpy
a=numpy.arange(10).astype('H')
b=struct.pack("<10H",*a)
---
(The module struct simply packs and unpacks data in byte-blobs).
It works OK with python2.4, but gives problems with python2.5.
On my laptop (linux x86_64 on intel cor
14 matches
Mail list logo