Skip to content

Commit

Permalink
Merge pull request facebookresearch#248 from hpasapp/fix-object-array…
Browse files Browse the repository at this point in the history
…-load

fix error 'ValueError: Object arrays cannot be loaded when allow_pick…
  • Loading branch information
ajfisch committed May 25, 2020
2 parents 96f343c + aa91573 commit 3fe64a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drqa/retriever/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def save_sparse_csr(filename, matrix, metadata=None):


def load_sparse_csr(filename):
loader = np.load(filename)
loader = np.load(filename, allow_pickle=True)
matrix = sp.csr_matrix((loader['data'], loader['indices'],
loader['indptr']), shape=loader['shape'])
return matrix, loader['metadata'].item(0) if 'metadata' in loader else None
Expand Down

0 comments on commit 3fe64a5

Please sign in to comment.