> To learn array basics:
> http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html>
> http://www.scipy.org/Numpy_Example_List#head-a8a8874581c2ebfc69a37ab513974a229ff3bfaa>
> http://www.scipy.org/Numpy_Example_List#head-a261b8dd10bda6a5fc268fe4f4171acee2f83968>
> ht
On Dec 21, 2007 12:37 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi
> i am a beginner with numpy and python,so pardon me if this doubt seems
> silly
> i want to create a matrix with say 3 rows and 5 columns..and then set
> the values of each item in it .for this i did something like below
To learn array basics:
http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html>
http://www.scipy.org/Numpy_Example_List#head-a8a8874581c2ebfc69a37ab513974a229ff3bfaa>
http://www.scipy.org/Numpy_Example_List#head-a261b8dd10bda6a5fc268fe4f4171acee2f83968>
http://homes
or, you can either use fill.
In [53]: M = numpy.matrix(numpy.zeros((3,5)))
In [55]: M.fill(999)
In [56]: M
Out[56]:
matrix([[ 999., 999., 999., 999., 999.],
[ 999., 999., 999., 999., 999.],
[ 999., 999., 999., 999., 999.]])
L.
On 12/21/07, [EMAIL PROTECTED] <[EMAIL PR
Hi,
You can use ones as well if the array (not matrix) has the same values, or
the array function to create an array from a sequence, or matrix for matrix
and a sequence of sequences
a = n.ones((3,5)) * 9
b = n.array((1, 2, 3), (4, 5, 6), (6, 7, 8))
c = n.matrix((1, 2, 3), (4, 5, 6), (6, 7, 8
hi
i am a beginner with numpy and python,so pardon me if this doubt seems
silly
i want to create a matrix with say 3 rows and 5 columns..and then set
the values of each item in it .for this i did something like below
myarray=zeros((3,5))
#then set the items
for row in range(3):
for col in rang
hi
i am a beginner with numpy and python,so pardon me if this doubt seems
silly
i want to create a matrix with say 3 rows and 5 columns..and then set
the values of each item in it .for this i did something like below
myarray=zeros((3,5))
#then set the items
for row in range(3):
for col in rang