I tried posting this to numpy, but my posts never show up. So, I was hoping
someone here might be able to help me.

I have two arrays that are different sizes and i would like to be able
to add them for plotting.

If I have an array a and b,

[[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]
[1 2 3 4 5 6 7 8 9]]

[[0 0 0 0 0]
[0 3 3 3 0]
[0 3 3 3 0]
[0 3 3 3 0]
[0 0 0 0 0]]

but I would like to change b to look like this,

[[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 3 3 3 3 3 0 0]
[0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0]]

so I can get the sum of a and b.

My data will not be regular like these. I have a 400x60 array with
irregular data that I would like as a 400x400 array. Does anybody
know of an easy way to accomplish this?

Bryan


-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to