From dfe197f791b9462c83d7ec9cc141886c868628a7 Mon Sep 17 00:00:00 2001 From: laurent Date: Sun, 2 Jul 2023 07:19:46 +0100 Subject: Handle more input types to create tensors. --- candle-pyo3/test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'candle-pyo3/test.py') diff --git a/candle-pyo3/test.py b/candle-pyo3/test.py index 0db3fab9..aad5e8ae 100644 --- a/candle-pyo3/test.py +++ b/candle-pyo3/test.py @@ -4,3 +4,8 @@ t = candle.Tensor(42.0) print(t) print("shape", t.shape, t.rank) print(t + t) + +t = candle.Tensor([3, 1, 4, 1, 5, 9, 2, 6]) +print(t) +print(t+t) +print(t.reshape([2, 4])) -- cgit v1.2.3