matrix construction from 2D double arrays