Multidimensional Arrays

Learn what multidimensional arrays are and how to use them.

We'll cover the following

An array of an array of array

We are already familiar with two types of arrays: one-dimensional and two-dimensional arrays. However, there can be multiple dimensions to an array, so it’s more like an “array of an array of array.” Sometimes, they call it “tensor.” For example, a popular machine learning framework is TensorFlow, which sounds like something flows over a multidimensional array and changes its inner data.

Here is an example of a three-dimensional array in Ruby:

Get hands-on with 1200+ tech skills courses.