Fix flake8

This commit is contained in:
Kentaro Wada
2017-05-21 07:11:14 +09:00
parent 9d11399d59
commit f4b3d8a282
+19 -18
View File
@@ -112,24 +112,25 @@
### Calculation ### Calculation
| Numpy | PyTorch | | Numpy | PyTorch |
|:------------|:--------------------------------------| |:--------------|:--------------------------------------|
| `x.min` | `mins, indices = torch.min(x, [dim])` | | `x.min` | `mins, indices = torch.min(x, [dim])` |
| `x.argmin` | `mins, indices = torch.min(x, [dim])` | | `x.argmin` | `mins, indices = torch.min(x, [dim])` |
| `x.max` | `maxs, indices = torch.max(x, [dim])` | | `x.max` | `maxs, indices = torch.max(x, [dim])` |
| `x.argmax` | `maxs, indices = torch.max(x, [dim])` | | `x.argmax` | `maxs, indices = torch.max(x, [dim])` |
| `x.clip` | | | `x.clip` | |
| `x.round` | `y.round` | | `x.round` | `x.round` |
| | `y.floor` | | `np.floor(x)` | `x.floor()` |
| `x.trace` | `y.trace` | | `np.ceil(x)` | `x.ceil()` |
| `x.sum` | `y.sum` | | `x.trace` | `x.trace` |
| `x.cumsum` | `y.cumsum` | | `x.sum` | `x.sum` |
| `x.mean` | `x.mean` | | `x.cumsum` | `x.cumsum` |
| `x.std` | `x.std` | | `x.mean` | `x.mean` |
| `x.prod` | `x.prod` | | `x.std` | `x.std` |
| `x.cumprod` | `x.cumprod` | | `x.prod` | `x.prod` |
| `x.all` | `(y == 1).sum() == y.nelement()` | | `x.cumprod` | `x.cumprod` |
| `x.any` | `(y == 1).sum() > 0` | | `x.all` | `(x == 1).sum() == x.nelement()` |
| `x.any` | `(x == 1).sum() > 0` |
### Arithmetic and comparison operations ### Arithmetic and comparison operations