Hi nice numpy people
I was wondering if anyone could shed some light on how to distinguish an
empty array of a given shape and an zeros array of the same dimensions.
Thanks
Andy
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
It does indeed work
Thanks for the help
Andy
LB wrote:
If you just want to add your matrix to an existing ascii file, you can
open this file in append mode and give the file handle to
numpy.savetxt :
f_handle = file('my_file.dat', 'a')
savetxt(f_handle, my_matrix)
f_handle.close()
HTH
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],
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],
, as it
is b)
a[row]
or the row index
find(row==True)
Mark
On Aug 15, 11:53 am, Andy Cheesman [EMAIL PROTECTED]
wrote:
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