def test_ind_to_sub_rdd(self): dataLocal = map(lambda x: (x, array([1.0])), range(1, 13)) data = Series(self.sc.parallelize(dataLocal)) subs = data.indToSub(dims=[2, 3, 2]).keys().collect() assert(allclose(subs, array([(1, 1, 1), (2, 1, 1), (1, 2, 1), (2, 2, 1), (1, 3, 1), (2, 3, 1), (1, 1, 2), (2, 1, 2), (1, 2, 2), (2, 2, 2), (1, 3, 2), (2, 3, 2)])))