Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CondensedMatrix problem #8

Open
victor-gil-sepulveda opened this issue Nov 13, 2013 · 0 comments
Open

CondensedMatrix problem #8

victor-gil-sepulveda opened this issue Nov 13, 2013 · 0 comments

Comments

@victor-gil-sepulveda
Copy link
Owner

This does not work:

N = len(elements)
new_matrix = CondensedMatrix([1.]((N(N-1)/2)))
for i in range(len(elements)-1):
e_i = elements[i]
for j in range(i+1,len(elements)):
e_j = elements[j]
new_matrix[i, j] = old_matrix[e_i, e_j]
return new_matrix

Probably because of the data returning policy, the condensed matrix can be modified but the returned array is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant