From a8b592783b166253c4097ab4cf6e4d298693225e Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 8 Nov 2017 11:24:35 +0100 Subject: [PATCH] Make a dtype more specific, to fix a windows build --- spacy/_ml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/_ml.py b/spacy/_ml.py index 01011cd78..171945ea2 100644 --- a/spacy/_ml.py +++ b/spacy/_ml.py @@ -94,7 +94,7 @@ def _zero_init(model): def _preprocess_doc(docs, drop=0.): keys = [doc.to_array([LOWER]) for doc in docs] ops = Model.ops - lengths = ops.asarray([arr.shape[0] for arr in keys]) + lengths = ops.asarray([arr.shape[0] for arr in keys], dtype='int32') keys = ops.xp.concatenate(keys) vals = ops.allocate(keys.shape[0]) + 1 return (keys, vals, lengths), None