From 464da52524ce94d6c41cc053bb7f8f9cc4df6ddc Mon Sep 17 00:00:00 2001 From: tynanbe Date: Thu, 14 Sep 2023 08:45:23 -0500 Subject: [PATCH] Use proper error handling in the example --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 827afee..98b4c83 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,10 @@ pub fn announce_winner( // The "Horse" Axis size will be inferred based on the data when a Tensor is // put into our Space (perhaps we won't always know how many horses will run). // - let assert Ok(d2) = + use d2 <- result.try( space.d2(Infer(name: "Horse"), Axis(name: "Trial", size: 2)) + |> result.map_error(with: tensor.SpaceErrors), + ) // Every Tensor has a numerical Format, a Space, and some data. // A 2d Tensor can be visualized like a table or matrix.