1.8. About Structures

  • Scalar - 0 dimensional array

  • Vector - 1 dimensional array

  • Matrix - 2 dimensional array

  • Tensor - 3 dimensional array

1.8.1. Scalar

  • Scalar - 0 dimensional array

Code 1.9. Scalar
1

1.8.2. Vector

  • Vector - 1 dimensional array

Code 1.10. Vector
[1, 2, 3]

1.8.3. Matrix

  • Matrix - 2 dimensional array

Code 1.11. Matrix
[[1, 2, 3],
 [4, 5, 6],
 [7, 8, 9]]

1.8.4. Tensor

  • Tensor - 3 dimensional array

Code 1.12. Tensor
[[[1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]],

 [[1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]]]