[EMAIL PROTECTED] wrote:
I need to iterate values by row and column as well.
I tried this
w,x = 32, 16
A = [ [0x0]*w for i in range(x)]
print A
py> import numarray
py> print numarray.zeros((16, 8))
[[0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0]
[
The F.A.Q. does not explain how to create a 2 dimensional array and
initialize it to zero.
I need to iterate values by row and column as well.
I tried this
w,x = 32, 16
A = [ [0x0]*w for i in range(x)]
print A
It does not create a 2 dimensional array with 32 rows and 16 columns
Thanks,
-SB
On 30 Mar 2005 13:02:05 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> Can I do something like this?
>
> table = {}
> table[32, 16] = 0x0
>
> Where 32 specifies rows and 16 specifies columns and i am trying to
> initialize it to zero
>
> I should be able to do comparisons like