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

Provide NumPy indexing for ElementReportReader, SpikePopulation #153

Open
asanin-epfl opened this issue Aug 2, 2021 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@asanin-epfl
Copy link
Contributor

Would it be possible to provide access to reports data via NumPy indices? An example

report = ElementReportReader('report.h5')
rep_pop = report['All']

rep_pop[:,10]  # the same as `rep_pop.get(tstart=10.0, tstop=10.0)`

rep_pop[13]  # the same as `rep_pop.get(node_id=13)`

The reason for this is to be able use Dask for reports processing. In particular:

import dask.array as da
dask_report = da.from_array(rep_pop, chunks=(1000, 1000))

cc @mgeplf

@mgeplf
Copy link
Contributor

mgeplf commented Aug 9, 2021

I think something like this makes senese under the condition that the full report isn't being loaded into memory.

@asanin-epfl: can you see proof-of-concept this in the python/libsonata/__init__.py with only python code? Please make sure to test that the full report isn't being loaded into memory.

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

No branches or pull requests

2 participants