logo       

MA.zeros problem: msg#00060

python.numeric.general

Subject: MA.zeros problem

Hi all,
I have some code that uses Numeric, and I'm trying to change it so that it
supports MA as well. My code uses Numeric.zeros to create a matrix and then
populates it, but I'm having trouble figuring out how to do something similar
in MA.

Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MA
>>> MA.__version__
'11.1.0'
>>> a = MA.zeros((2,2))
>>> a
array(
[[0,0,]
[0,0,]])
>>> a[1][1] = 2
>>> a
array(
[[0,0,]
[0,0,]])

Is there some function to automatically create a masked array of arbitrary
dimensions filled with zeroes? Thanks.
--
Stephen Pitts
smpitts@xxxxxx



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise