Returns a view of a Spec
with a converted data type.
If base_spec.dtype()
is known, the conversion is validated.
- Parameters:
- const Spec &base_spec
The Spec to convert.
- DataType target_dtype
Target data type.
- Error absl::StatusCode::kInvalidArgument:
if the conversion is not
supported.