cdef class Grid:
    cdef long[:] _shape
    cdef double[:] _spacing
    cdef double[:] _origin
    cdef double[:,:] _points
    cdef int _size

cdef class Grid1D(Grid):
    pass

cdef class Grid2D(Grid):
    cdef:
        int _shape_0
        int _shape_1
        double _spacing_0
        double _spacing_1
        double _origin_0
        double _origin_1
    cdef double to_x(self, int index)
    cdef double to_y(self, int index)

cdef class Grid3D(Grid):
    cdef:
        int _shape_0
        int _shape_1
        int _shape_2
        double _spacing_0
        double _spacing_1
        double _spacing_2
        double _origin_0
        double _origin_1
        double _origin_2

