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

DatasetUtils cube2matrix inefficient matrix assignment #1

Open
orenshatz opened this issue May 14, 2015 · 1 comment
Open

DatasetUtils cube2matrix inefficient matrix assignment #1

orenshatz opened this issue May 14, 2015 · 1 comment
Assignees

Comments

@orenshatz
Copy link
Contributor

Each cube file content is reshaped and then swapped axes.
It is unclear why this swapping is necessary, given that knossos never does it and
presents a coherent supercube.
Anyway, as the strides of the resulting matrix are incompatible with the large output matrix,
assignment is voxel-wise rather than block-wise, i.e. extremely inefficient.

As proof of concept I simply cancelled the swapaxes (which by itself took nothing
much), then the assignment dropped from something to practically nothing.

@orenshatz orenshatz self-assigned this May 14, 2015
@xeray
Copy link
Contributor

xeray commented Apr 9, 2016

If you remove the swap simply, it won't work. But the swap becoms unnecessary if in this line the order of current coordinates is changed from 0,1,2 to 2,1,0. Then the resulting array has axis order z,y,x and the sub-arrays are assembled in a consistent manner.

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

2 participants