From 56e7a09152ef8719eb2feeaf29a7b3306cfa3b2d Mon Sep 17 00:00:00 2001 From: Jared Lumpe Date: Sat, 3 Aug 2024 23:42:49 -0700 Subject: [PATCH] Fix type annotation and docstring --- src/gambit/kmers.py | 2 +- src/gambit/metric.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gambit/kmers.py b/src/gambit/kmers.py index 26e150f..34ccb6c 100644 --- a/src/gambit/kmers.py +++ b/src/gambit/kmers.py @@ -129,7 +129,7 @@ def __from_json__(cls, data: dict[str, Any]) -> 'KmerSpec': @attrs(slots=True) class KmerMatch: - """Represents a + """Represents the location of a k-mer prefix found within a DNA sequence. Attributes ---------- diff --git a/src/gambit/metric.py b/src/gambit/metric.py index b538b68..b7027c3 100644 --- a/src/gambit/metric.py +++ b/src/gambit/metric.py @@ -54,7 +54,7 @@ def jaccard_bits(bits1: np.ndarray, bits2: np.ndarray) -> float: return 1. if union == 0 else intersection / union -def jaccarddist_array(query: KmerSignature, refs: Sequence[KmerSignature], out: np.ndarray = None) -> np.ndarray: +def jaccarddist_array(query: KmerSignature, refs: Sequence[KmerSignature], out: Optional[np.ndarray] = None) -> np.ndarray: """ Calculate Jaccard distances between a query k-mer signature and a list of reference signatures.