David M. Cooke wrote:
> On Thu, Aug 16, 2007 at 04:39:02PM -1000, Eric Firing wrote:
>> As far as I can see there is no way of using svn diff to deal with
>> this automatically, so in the attached revision I have manually removed
>> chunks resulting solely from whitespace.
>>
>> Is there a better
Geoffrey Zhu wrote:
> Hi All,
>
> I want to construct a numpy array based on Python objects. In the
> below code, opts is a list of tuples.
>
> For example,
>
> opts=[ ('C', 100, 3, 'A'), ('K', 200, 5.4, 'B')]
>
> If I use a generator like the following:
>
> K=numpy.array(o[2]/1000.0 for o in
David M. Cooke wrote:
On Thu, Aug 16, 2007 at 04:39:02PM -1000, Eric Firing wrote:
As far as I can see there is no way of using svn diff to deal with
this automatically, so in the attached revision I have manually removed
chunks resulting solely from whitespace.
Is there a better way to handl
On Thu, Aug 16, 2007 at 04:39:02PM -1000, Eric Firing wrote:
> As far as I can see there is no way of using svn diff to deal with
> this automatically, so in the attached revision I have manually removed
> chunks resulting solely from whitespace.
>
> Is there a better way to handle this problem?
David Cournapeau wrote:
On 8/17/07, Eric Firing <[EMAIL PROTECTED]> wrote:
In looking at maskedarray performance, I found that the filled()
function or method is a bottleneck. I think it can be sped up by using
putmask instead of indexed assignment, but I found that putmask itself
is slower tha
On 8/17/07, Eric Firing <[EMAIL PROTECTED]> wrote:
> In looking at maskedarray performance, I found that the filled()
> function or method is a bottleneck. I think it can be sped up by using
> putmask instead of indexed assignment, but I found that putmask itself
> is slower than it needs to be.
On Thu, 16 Aug 2007, Geoffrey Zhu apparently wrote:
> K=numpy.array(o[2]/1000.0 for o in opts)
> It does not work.
K=numpy.fromiter((o[2]/1000.0 for o in opts),'float')
hth,
Alan Isaac
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
ht
Hi All,
I want to construct a numpy array based on Python objects. In the
below code, opts is a list of tuples.
For example,
opts=[ ('C', 100, 3, 'A'), ('K', 200, 5.4, 'B')]
If I use a generator like the following:
K=numpy.array(o[2]/1000.0 for o in opts)
It does not work.
I have to use:
nu
In looking at maskedarray performance, I found that the filled()
function or method is a bottleneck. I think it can be sped up by using
putmask instead of indexed assignment, but I found that putmask itself
is slower than it needs to be. So I followed David Cournapeau's example
of fastclip an
Dear nice people
I'm trying to match a row (b) within a large numpy array (a). My most
successful attempt is below
hit = equal(b, a)
total_hits = add.reduce(hit, 1)
max_hit = argmax(total_hits, 0)
answer = a[max_hit]
where ...
a = array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
On Wed, Aug 15, 2007 at 08:50:28PM -0400, Anne Archibald wrote:
> You have to be a bit careful, because a view really is just a view
> into the array - the original is still around. So you can't really
> delete the array contents when the view is deleted. Really, if you do:
> B = A[::2]
> del B
> n
The closest I can think of is:
a = a[range(len(a)) != 1]
Nadav.
On Wed, 2007-08-15 at 02:07 -0700, mark wrote:
> I am trying to delete a value from an array
> This seems to work as follows
>
> >>> a = array([1,2,3,4])
> >>> a = delete( a, 1 )
> >>> a
> array([1, 3, 4])
>
> But wouldn't it
12 matches
Mail list logo