Fixed meshgrid to return arrays with same dtype as arguments.