Stay organized with collections
Save and categorize content based on your preferences.
Reshapes an array to a new list of dimension lengths.
Usage
Returns
Array.reshape(shape)
Array
Argument
Type
Details
this: array
Array
Array to reshape.
shape
Array
New shape to which arrays are converted. If one component of the shape is the special value -1, the size of that dimension is computed so that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape can be -1.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["The `reshape` method modifies the structure of an array without changing its data."],["It allows you to specify a new shape using the `shape` argument, which is an array of dimension lengths."],["A `-1` within the `shape` array automatically calculates the size of that dimension to maintain the total number of elements."]]],[]]