def join(self, b, dimidx): r = ArrayMath.join(self.array.array, b.array.array, dimidx) dima = self.dimvalue(dimidx) dimb = b.dimvalue(dimidx) dimr = [] if dima[0] < dimb[0]: for i in range(0, len(dima)): dimr.append(dima[i]) for i in range(0, len(dimb)): dimr.append(dimb[i]) else: for i in range(0, len(dimb)): dimr.append(dimb[i]) for i in range(0, len(dima)): dimr.append(dima[i]) rdims = [] for i in range(0, len(self.dims)): if i == dimidx: ndim = Dimension() ndim.setDimValues(dimr) rdims.append(ndim) else: rdims.append(self.dims[i]) return DimArray(MIArray(r), rdims, self.fill_value, self.proj)
def join(self, b, dimidx): r = ArrayMath.join(self.array, b.array, dimidx) dima = self.dimvalue(dimidx) dimb = b.dimvalue(dimidx) dimr = [] if dima[0] < dimb[0]: for i in range(0, len(dima)): dimr.append(dima[i]) for i in range(0, len(dimb)): dimr.append(dimb[i]) else: for i in range(0, len(dimb)): dimr.append(dimb[i]) for i in range(0, len(dima)): dimr.append(dima[i]) rdims = [] for i in range(0, len(self.dims)): if i == dimidx: ndim = Dimension() ndim.setDimValues(dimr) rdims.append(ndim) else: rdims.append(self.dims[i]) return DimArray(MIArray(r), rdims, self.fill_value, self.proj)
def join(self, b, dimidx): r = ArrayMath.join(self.array, b.array, dimidx) return MIArray(r)