mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-06 13:20:20 +03:00
Undo changes to extract_spans
This commit is contained in:
parent
df73823aae
commit
4ecccf8460
|
@ -32,8 +32,8 @@ def forward(
|
|||
Y = Ragged(X.dataXd[indices], spans.dataXd[:, 1] - spans.dataXd[:, 0]) # type: ignore[arg-type, index]
|
||||
else:
|
||||
Y = Ragged(
|
||||
ops.xp.zeros((0, 0), dtype=X.dataXd.dtype),
|
||||
ops.xp.zeros((0,), dtype="i"),
|
||||
ops.xp.zeros(X.dataXd.shape, dtype=X.dataXd.dtype),
|
||||
ops.xp.zeros((len(X.lengths),), dtype="i"),
|
||||
)
|
||||
x_shape = X.dataXd.shape
|
||||
x_lengths = X.lengths
|
||||
|
|
Loading…
Reference in New Issue
Block a user