adding pylint (#233)

This commit is contained in:
Robert Nishihara
2016-07-08 12:39:11 -07:00
committed by Philipp Moritz
parent d8a621e5cb
commit 191909dd93
7 changed files with 422 additions and 19 deletions
+1 -1
View File
@@ -192,7 +192,7 @@ def subblocks(a, *ranges):
if ranges[i][0] < 0:
raise Exception("Values in the ranges passed to sub_blocks must be at least 0, but the {}th range is {}.".format(i, ranges[i]))
if ranges[i][-1] >= a.num_blocks[i]:
raise Exception("Values in the ranges passed to sub_blocks must be less than the relevant number of blocks, but the {}th range is {}, and a.num_blocks = {}.".format(i, ranges[i], a.num_blocks))
raise Exception("Values in the ranges passed to sub_blocks must be less than the relevant number of blocks, but the {}th range is {}, and a.num_blocks = {}.".format(i, ranges[i], a.num_blocks))
last_index = [r[-1] for r in ranges]
last_block_shape = DistArray.compute_block_shape(last_index, a.shape)
shape = [(len(ranges[i]) - 1) * BLOCK_SIZE + last_block_shape[i] for i in range(a.ndim)]
@@ -1,5 +1,3 @@
from typing import List
import numpy as np
import ray.array.remote as ra
import ray