Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Python

Numpy/Scipy set field of matrix?

 
Jump to:  
 
cnb
PostPosted: Tue Sep 02, 2008 8:27 pm    Post subject: Numpy/Scipy set field of matrix?
       
, 'argmax', 'argmin', 'argsort', 'astype', 'base', 'byteswap',
'choose', 'clip', 'compress', 'conj', 'conjugate', 'copy', 'ctypes',
'cumprod', 'cumsum', 'data', 'diagonal', 'dtype', 'dump', 'dumps',
'fill', 'flags', 'flat', 'flatten', 'getA', 'getA1', 'getH', 'getI',
'getT', 'getfield', 'imag', 'item', 'itemset', 'itemsize', 'max',
'mean', 'min', 'nbytes', 'ndim', 'newbyteorder', 'nonzero', 'prod',
'ptp', 'put', 'ravel', 'real', 'repeat', 'reshape', 'resize', 'round',
'searchsorted', 'setfield', 'setflags', 'shape', 'size', 'sort',
'squeeze', 'std', 'strides', 'sum', 'swapaxes', 'take', 'tofile',
'tolist', 'tostring', 'trace', 'transpose', 'var', 'view']

Quote:
m
matrix([[1, 2, 3],

[4, 5, 6],
[7, 8, 9]])

how do I set the field 1,2 (=6) to 45 for example?


and how do I initialize a matrix and then add values in a for-loop?

Im using PIL and want to store all the pixels of an image in a matrix.

But I can't find the appropriate operations.
 

 
Marc 'BlackJack' Rintsch
PostPosted: Tue Sep 02, 2008 8:27 pm    Post subject: Re: Numpy/Scipy set field of matrix?
       
On Tue, 02 Sep 2008 13:27:06 -0700, cnb wrote:

Quote:
m
matrix([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])

how do I set the field 1,2 (=6) to 45 for example?


and how do I initialize a matrix and then add values in a for-loop?

Im using PIL and want to store all the pixels of an image in a matrix.

But I can't find the appropriate operations.

Work through the tutorial in the Python documentation and read some
introduction to Numpy.

Ciao,
Marc 'BlackJack' Rintsch
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

mieszkania do wynajecia warszawa oddam psa sieczkarnie Karaoke księgarnia