Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mwatershed

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mwatershed

A rusty mutex watershed

  • 0.5.2
  • PyPI
  • Socket score

Maintainers
1

mwatershed

A rusty mutex watershed

  • Free software: MIT License

Installation

pip install git+https://github.com/pattonw/mwatershed

Features

  • A mutex watershed implementation for affinities
  • Should handle up to 6 dimensional arrays of fragments (7 dimensions if you include offsets in affinities) but only tested on 2 and 3 dimensions

Usage

components = mwatershed.agglom(
    affinities: NDArray[np.float64],
    offsets: list[list[int]],
    seeds: NDArray[np.uint64],
    edges: Optional[list[tuple[usize, usize, f64]]] = None,
)

where:

  • affinities is a k+1 dimensional array of non nan affinities with leading dimension having size n
  • offsets is a list of length n of offset tuples of k integers
  • seeds is a k dimensional array of fragment ids. Note seeds.shape must be equal to affinities.shape[1:]. Any entry not equal to 0 is guaranteed to stay that way, any entry equal to zero has no priors.
  • edges is a list of (u, v, aff) tuples to insert arbitrary extra affinities between fragment ids

Credits

This package was created with Cookiecutter and the pattonw/cookiecutter-rust-pypackage project template.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc