We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
torch.count_nonzero
axis
keepdims=True
from array_api_compat import torch as xp x = xp.asarray([1]) xp.count_nonzero(x, axis=(0,), keepdims=True) # TypeError: unsqueeze(): argument 'dim' (position 1) must be int, not tuple