added Mat::new_from_ptr for unsafe construction