Re: [Numpy-discussion] Problem with set_fill_value for masked structured array

2009-12-14 Thread Thomas Robitaille


Pierre GM-2 wrote:
 
 Well, that's a problem indeed, and I'd put that as a bug.
 However, you can use that syntax instead:
 t.fill_value['a']=10
 or set all the fields at once:
t.fill_value=(10,99)
 

Thanks for your reply - should I submit a bug report on the numpy trac site?

Thomas

-- 
View this message in context: 
http://old.nabble.com/Problem-with-set_fill_value-for-masked-structured-array-tp26770843p26780052.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Problem with set_fill_value for masked structured array

2009-12-14 Thread Pierre GM
On Dec 14, 2009, at 4:28 PM, Thomas Robitaille wrote:
 Pierre GM-2 wrote:
 
 Well, that's a problem indeed, and I'd put that as a bug.
 However, you can use that syntax instead:
 t.fill_value['a']=10
 or set all the fields at once:
 t.fill_value=(10,99)
 
 
 Thanks for your reply - should I submit a bug report on the numpy trac site?


Always best to do so...
Thx in advance !!!
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Problem with set_fill_value for masked structured array

2009-12-13 Thread Pierre GM
On Dec 13, 2009, at 6:18 PM, Thomas Robitaille wrote:
 Hi,
 
 The following code doesn't seem to work:
 
 import numpy.ma as ma
 
 t = ma.array(zip([1,2,3],[4,5,6]),dtype=[('a',int),('b',int)])
 print repr(t['a'])
 t['a'].set_fill_value(10)
 print repr(t['a'])
 
 As the output is
 
 masked_array(data = [1 2 3],
  mask = [False False False],
fill_value = 99)
 
 masked_array(data = [1 2 3],
  mask = [False False False],
fill_value = 99)
 
 (and no exception is raised)
 
 Am I doing something wrong?

Well, that's a problem indeed, and I'd put that as a bug.
However, you can use that syntax instead:
 t.fill_value['a']=10
or set all the fields at once:
t.fill_value=(10,99)

I gonna try to see what I can do, but don't expect it in 1.4.x

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion