Abstract. We introduce an inversion algorithm for electrical impedance tomography (EIT) with partial boundary measurements, in two dimensions. It gives stable and fast reconstructions using sparse parameterizations of the unknown conductivity on optimal grids that are computed as part of the inversion. We follow the approach in [8,27] that connects inverse discrete problems for resistor networks to continuum EIT problems, using optimal grids. The algorithm in [8,27] is based on circular resistor networks, and solves the EIT problem with full boundary measurements. It is extended in [11] to EIT with partial boundary measurements, using extremal quasiconformal mappings that transform the problem to one with full boundary measurements. Here we introduce a different class of optimal grids, based on resistor networks with pyramidal topology, that is better suited for the partial measurements setup. We prove the unique solvability of the discrete inverse problem for these networks, and develop an algorithm for finding them from the measurements of the DtN map. Then, we show how to use the networks to define the optimal grids and to approximate the unknown conductivity. We assess the performance of our approach with numerical simulations and compare the results with those in [11].