Skip to content

Auto-format code with black #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions thinc/backends/_custom_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,13 @@ def clipped_linear(

def gather_add(table, indices, *, threads_per_block=128, num_blocks=128):
if table.ndim != 2:
raise ValueError(f"gather_add expects table with dimensionality 2, was: {table.ndim}")
raise ValueError(
f"gather_add expects table with dimensionality 2, was: {table.ndim}"
)
if indices.ndim != 2:
raise ValueError(f"gather_add expects indices with dimensionality 2, was: {indices.ndim}")
raise ValueError(
f"gather_add expects indices with dimensionality 2, was: {indices.ndim}"
)
_is_float_array(table)
indices = indices.astype("int32")
_check_indices(indices, table.shape[0])
Expand Down