Given the full size of the array and a shape that may contain -1 as the
implicit dimension, returns the inferred shape where -1 is replaced.
E.g. For shape=[2, -1, 3] and size=24, it will return [2, 4, 3].
Parameters
shape: number[]
The shape, which may contain -1 in some dimension.
size: number
The full size (number of elements) of the array.
Returns number[]
The inferred shape where -1 is replaced with the inferred size.
Given the full size of the array and a shape that may contain -1 as the implicit dimension, returns the inferred shape where -1 is replaced. E.g. For shape=[2, -1, 3] and size=24, it will return [2, 4, 3].