Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

dimensions function

The size of a list or a matrix, level by level.

How to write it

dimensions(list)

list
A list, or a matrix. Takes a list.

Examples

  • dimensions⁡((123456))=[2,3]\displaystyle \operatorname{dimensions}\left(\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}\right) = \left[ 2, 3 \right]
    dimensions([[1, 2, 3], [4, 5, 6]])

    In the solver, dimensions([[1, 2, 3], [4, 5, 6]]) gives [2, 3].

    Open in the solver
  • drop

    A list without its first elements.

  • count

    How many elements of a list equal a value.

  • first

    The first element of a list.

  • constant_array

    A list of copies of a value.

  • flatten

    Nested lists flattened into one list.

  • complement

    The elements of a list that are in none of the others.