-
Notifications
You must be signed in to change notification settings - Fork 33
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
Integrate fastcore functions #150
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- _generate_segments() and _break_segments() - _connected_components() if input is skeleton - skeletons.cable_length (via new cable_length() function) - geodesic_matrix() - prune_twigs() when precise=False - segments_to_coords - synapse_flow_centrality()
- this also changes how the "greedy" method works
no clue why that passed previously - I did investigate but did not find a reason
- eval_color: make sure numpy arrays are not converted to lists - prepare_colormap: not sure why this was wrong but it was - mesh2plotly: deal with rgb vs rgba colors
- remove accidental return - fix single query target
1. Ignore LOD if the mesh source doesn't support it (change in CV?) 2. Don't break if NeuronList is empty
schlegelp
changed the title
[WIP] Integrate fastcore functions
Integrate fastcore functions
Aug 15, 2024
There is one remaining failing test: strangely, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a work-in-progress PR to integrate functions re-implemented in Rust via navis-fastcore.
List of functions that will now use
fastcore
under-the-hood if available:geodesic_matrix()
: 20x faster (note that this will also speed up a number of downstream functions such aslongest_neurite
)prune_twigs()
: 4x fasterstrahler_index()
: 20x fastersynapse_flow_centrality()
: 4.5x faster (but importantly much more memory efficient)segments_to_coords()
: 3.5x faster (this function is a major bottleneck during plotting)TreeNeuron.cable_length
property: 2x faster_connected_components()
: 1.4x fasterPotential TODOs:
Misc:
synblast
multiprocessing (pickling) issueax.add_collection3d
inplot2d
(introduced with in recentmatplotlib
version)radius=True
(caused error previously)fetch_mesh_neuron()
will now ignorelod
parameter if not supported by mesh source (e.g. for legacy meshes); previously this caused an errornumpy
,igraph
andmatplotlib
subset_neuron
now sets._soma
toNone
if the soma is lost during subsetting