Пример #1
0
 def new_scontext( self ):
     '''
     Setup a new spatial context.
     '''
     sctx = SContext()
     sctx.domain_list = self
     return sctx
Пример #2
0
    def new_scontext(self):
        '''Spatial context factory'''
        sctx = SContext()
        nd = self.mats_eval.n_dims
        x, y = np.mgrid[0:nd + 1, 0:nd + 1]
        sctx.X_reg = np.c_[x.flatten(), y.flatten()]

        state_arr_size = self.mats_eval.get_state_array_size()
        sctx.mats_state_array = np.zeros(state_arr_size, 'float_')
        return sctx
Пример #3
0
    def new_scontext(self):
        '''Spatial context factory'''
        sctx = SContext()
        nd = self.mats_eval.n_dims
        x, y = np.mgrid[0:nd + 1, 0:nd + 1]
        sctx.X_reg = np.c_[x.flatten(), y.flatten()]

        state_arr_size = self.mats_eval.get_state_array_size()
        sctx.mats_state_array = np.zeros(state_arr_size, 'float_')
        return sctx