I'm looking at a matrix, say adjacency matrix of a graph, g.am(). I want to change some of the entries now. I am told it's a vector and it's immutable. What can I do? Thanks

1 | initial version |

I'm looking at a matrix, say adjacency matrix of a graph, g.am(). I want to change some of the entries now. I am told it's a vector and it's immutable. What can I do? Thanks

2 | No.2 Revision |

I'm looking at a matrix, say adjacency matrix of a graph, g.am(). I want to change some of the entries now. I am told it's a vector and it's immutable. What can I ~~do? ~~do?

One thought I had is adding some other matrix to it with only one nonblank entry. ~~Thanks~~But, is there some easy way to do that?

Thanks for any help

3 | No.3 Revision |

I'm looking at a matrix, say adjacency matrix of a graph, g.am(). I want to change some of the entries now. I am told it's a vector and it's immutable. What can I do?

One thought I had is adding some other matrix to it with only one nonblank entry. But, is there some easy way to do that?

Another thought I had was turning it into a list, list(g.am()). Maybe that's acceptable. I'm not 100% sure yet for what I'm working on. If I go that way, is there a way to print it in a matrix form again, i.e., entries print in a square shape.

Thanks for any help

4 | retagged |

I'm looking at a matrix, say adjacency matrix of a graph, g.am(). I want to change some of the entries now. I am told it's a vector and it's immutable. What can I do?

One thought I had is adding some other matrix to it with only one nonblank entry. But, is there some easy way to do that?

Another thought I had was turning it into a list, list(g.am()). Maybe that's acceptable. I'm not 100% sure yet for what I'm working on. If I go that way, is there a way to print it in a matrix form again, i.e., entries print in a square shape.

Thanks for any help

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.