Revert "use numpy array for dem"

This reverts commit 04562a8dc89fd474d73d4a9a22a035d8db59431b.