Skip to content

Commit

Permalink
black cli
Browse files Browse the repository at this point in the history
  • Loading branch information
NetRxn committed Jul 17, 2022
1 parent 560d0e6 commit 0d27bb1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scispacy/candidate_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
UmlsKnowledgeBase,
Mesh,
GeneOntology,
RxNorm,
RxNorm,
HumanPhenotypeOntology,
)

Expand Down Expand Up @@ -281,8 +281,12 @@ def nmslib_knn_with_zero_vectors(
neighbors.append([])
distances.append([])
# interleave `neighbors` and Nones in `extended_neighbors`
extended_neighbors[empty_vectors_boolean_flags] = numpy.array(neighbors, dtype='object')[:-1]
extended_distances[empty_vectors_boolean_flags] = numpy.array(distances, dtype='object')[:-1]
extended_neighbors[empty_vectors_boolean_flags] = numpy.array(
neighbors, dtype="object"
)[:-1]
extended_distances[empty_vectors_boolean_flags] = numpy.array(
distances, dtype="object"
)[:-1]

return extended_neighbors, extended_distances

Expand Down

0 comments on commit 0d27bb1

Please sign in to comment.