@property
    def aveEz2CC(self):
        # raise Exception('Not yet implemented!')
        if getattr(self, '_aveEz2CC', None) is None:
            I, J, V = [], [], []

            if self.dim == 2:
                raise Exception('There are no z edges in 2D')

            if self.dim == 3:
                PM = [1./4.]*4 # plus / plus

                for ii, ind in enumerate(self._sortedCells):
                    p = self._pointer(ind)
                    w = self._levelWidth(p[-1])

                    edgesz = [
                                self._ez2i[self._index([ p[0]    , p[1]    , p[2]    , p[3]])],
                                self._ez2i[self._index([ p[0] + w, p[1]    , p[2]    , p[3]])],
                                self._ez2i[self._index([ p[0]    , p[1] + w, p[2]    , p[3]])],
                                self._ez2i[self._index([ p[0] + w, p[1] + w, p[2]    , p[3]])],
                            ]

                    for pm, edge in zip(PM,edgesz):
                        I += [ii]
                        J += [edge]
                        V += [pm]


            Av = sp.csr_matrix((V,(I,J)), shape=(self.nC, self.ntEz))
            Re = self._deflationMatrix('Ez',asOnes=False,withHanging=True)

            self._aveEz2CC = Av*Re

        return self._aveEz2CC
Run code in the JS interpreter and return output.
dataset/ETHPy150Open simpeg/simpeg/SimPEG/Mesh/TreeMesh.py/TreeMesh.aveEz2CC--crossover with--dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/JsFormat/libs/jsbeautifier/unpackers/evalbased.py/jseval