////// Testing WLS Fit on Single Voxel //////
//Estimate tensor from test signals
model = TensorModel(gtab, min_signal=1e-8, fit_method="WLS")
tensor_est = model.fit(Y)
assert_equal(tensor_est.shape, Y.shape[:-1])
assert_array_almost_equal(tensor_est.evals[0], evals)
assert_array_almost_equal(tensor_est.quadratic_form[0], tensor,
err_msg= "Calculation of tensor from Y does not "
"compare to analytical solution")
assert_almost_equal(tensor_est.md[0], md)
// Test that we can fit a single voxel"s worth of data (a 1d array)
y = Y[0]
tensor_est = model.fit(y)
assert_equal(tensor_est.shape, tuple())
assert_array_almost_equal(tensor_est.evals, evals)
assert_array_almost_equal(tensor_est.quadratic_form, tensor)
assert_almost_equal(tensor_est.md, md)