def _extend_1d(self, delta, npoints):
        imax, = self.real_shape
        new_shape = (imax + npoints,)
        indx = imax if delta > 0 else npoints

        flow = FlowSolution()
        for arr in self._arrays:
            new_arr = numpy.zeros(new_shape)
            if delta > 0:
                new_arr[0:indx] = arr
                for i in range(npoints):
                    new_arr[indx+i] = arr[-1]
            else:
                new_arr[indx:] = arr
                for i in range(npoints):
                    new_arr[i] = arr[0]
            flow.add_array(self.name_of_obj(arr), new_arr)

        for vector in self._vectors:
            flow.add_vector(self.name_of_obj(vector),
                            vector.extend('i', delta, npoints))

        flow.grid_location = self.grid_location
        flow.ghosts = copy.copy(self._ghosts)
        flow._copy_scalars(self)
        return flow
Creates a new project owned by the authenticated user.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/datatypes/domain/flow.py/FlowSolution._extend_1d--crossover with--dataset/ETHPy150Open pyapi-gitlab/pyapi-gitlab/gitlab/__init__.py/Gitlab.createproject