change get_ptr() to ptr() in mdarray