In computer programming contexts, a data cube (or datacube) is a three- (or higher) dimensional array of values, commonly used to describe a time series of image data. A data cube is also used in the field of Imaging spectroscopy, since a spectrally-resolved image is represented as a three-dimensional volume.
For a time sequence of color images, the array is generally four-dimensional, with the dimensions representing image X and Y coordinates, time, and RGB (or other color space) color plane.
Many high-level computer languages treat data cubes and other large arrays as single entities distinct from their contents. These languages, of which APL, IDL, NumPy, PDL, and S-Lang are examples, allow the programmer to manipulate complete film clips and other data en masse with simple expressions derived from linear algebra and vector mathematics. Some languages (such as PDL) distinguish between a list of images and a data cube, while many (such as IDL) do not.
A tensor of rank three may be represented as a data cube.