def setUp(self): super(TestSearchsortedOp, self).setUp() self.op_class = SearchsortedOp self.op = SearchsortedOp() self.x = T.vector('x') self.v = T.tensor3('v') self.a = 30 * np.random.random(50).astype(config.floatX) self.b = 30 * np.random.random((8, 10, 5)).astype(config.floatX) self.idx_sorted = np.argsort(self.a).astype('int32')
def setup_method(self): super().setup_method() self.op_class = SearchsortedOp self.op = SearchsortedOp() self.x = T.vector("x") self.v = T.tensor3("v") self.a = 30 * np.random.random(50).astype(config.floatX) self.b = 30 * np.random.random((8, 10, 5)).astype(config.floatX) self.idx_sorted = np.argsort(self.a).astype("int32")