38 auto lhandle = group.openGroup(
"left");
39 left_details = validate_numeric_seed(lhandle, version, options);
41 std::throw_with_nested(std::runtime_error(
"failed to validate 'left'"));
46 auto rhandle = group.openGroup(
"right");
47 right_details = validate_numeric_seed(rhandle, version, options);
49 std::throw_with_nested(std::runtime_error(
"failed to validate 'right'"));
54 throw std::runtime_error(
"'left' and 'right' should have the same dimensions");
60 auto mhandle = group.openDataSet(
"method");
61 method = read_scalar_string_dataset(mhandle);
63 if (!is_valid_arithmetic_operation(method)) {
64 throw std::runtime_error(
"unrecognized operation '" + method +
"'");
68 std::throw_with_nested(std::runtime_error(
"failed to validate 'method'"));
71 left_details.
type = determine_arithmetic_output_type(left_details.
type, right_details.
type, method);