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

Review supposedly dead code in RxD. #3063

Open
1uc opened this issue Aug 29, 2024 · 0 comments
Open

Review supposedly dead code in RxD. #3063

1uc opened this issue Aug 29, 2024 · 0 comments

Comments

@1uc
Copy link
Collaborator

1uc commented Aug 29, 2024

The following lines are suspected to be dead code:

def _matrix_to_rxd_sparse(m):
"""precondition: assumes m a numpy array"""
nonzero_i, nonzero_j = list(zip(*list(m.keys())))
nonzero_values = numpy.ascontiguousarray(list(m.values()), dtype=float)
# number of rows
n = m.shape[1]
return (
n,
len(nonzero_i),
numpy.ascontiguousarray(nonzero_i, dtype=ctypes.c_long),
numpy.ascontiguousarray(nonzero_j, dtype=ctypes.c_long),
nonzero_values,
)

This ticket extracts a task from review comments:
https://github.com/neuronsimulator/nrn/pull/3040/files/7b9e1be83f16e36ec5e60d3da0cda1731938ae17#r1729011132

CC: @ramcdougal, @ceciliaromaro

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

No branches or pull requests

1 participant