Skip to content

Commit

Permalink
set ndarray type='object'
Browse files Browse the repository at this point in the history
  • Loading branch information
NetRxn committed Jul 16, 2022
1 parent ef96a93 commit d28f285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scispacy/candidate_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ 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)[:-1]
extended_distances[empty_vectors_boolean_flags] = numpy.array(distances)[:-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 d28f285

Please sign in to comment.