Skip to main content

Utilities for BiocPy

Project generated with PyScaffold PyPI-Server Monthly Downloads Unit tests

Motivation

This repository contains a variety of simple utilities for the BiocPy project, mostly convenient aspects of R that aren't provided by base Python. The aim is to simplify development of higher-level packages like scranpy and singler that would otherwise have to implement these methods individually.

Available utilities

match

import biocutils
biocutils.match(["A", "C", "E"], ["A", "B", "C", "D", "E"])
## [0, 2, 4]

factor

import biocutils
biocutils.factorize(["A", "B", "B", "A", "C", "D", "C", "D"])
## (['A', 'B', 'C', 'D'], [0, 1, 1, 0, 2, 3, 2, 3])

intersect

import biocutils
biocutils.intersect(["A", "B", "C", "D"], ["D", "A", "E"])
## ['A', 'D']

union

import biocutils
biocutils.union(["A", "B", "C", "D"], ["D", "A", "E"])
## ['A', 'B', 'C', 'D', 'E']

subset

import biocutils
biocutils.subset(["A", "B", "C", "D", "E"], [0, 2, 4])
## ['A', 'C', 'E']

import numpy as np
y = np.array([10, 20, 30, 40, 50])
biocutils.subset(y, [0, 2, 4])
## array([10, 30, 50])

is_list_of_type

Checks if all elements of a list or tuple are of the same type.

import biocutils
import numpy as np

x = [np.random.rand(3), np.random.rand(3, 2)]
biocutils.is_list_of_type(x, np.ndarray)
## True

and many more. Check out the documentation for more information.

Release files for biocutils 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biocutils 0.5.0
File Size Uploaded
biocutils-0.5.0.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biocutils 0.5.0
File Interpreter ABI Platform
biocutils-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 119.3 kB

Release files / biocutils-0.5.0.tar.gz

Download URL biocutils-0.5.0.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e40c48153497ccf7a5d089d2389bfda0cba573f20ceecc4162864ed3aefa926d
BLAKE2b-256 checksum
How to use checksums
0c38230e33d1efb63899ca5bcbdee13eb90cb8959da35903b52a774ad04c146f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / biocutils-0.5.0-py3-none-any.whl

Download URL biocutils-0.5.0-py3-none-any.whl
Size 58.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22a6e7ad4584770e2631bd076b1420642deba91b615e775734c01cbcab52ee12
BLAKE2b-256 checksum
How to use checksums
6b22e054d7d2c756ca3e27737b854ff92485e4c8fe79d63cdc713720081dfcb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page