Construct an array with the given value.
Constructs an array of size shape filled with vals. If vals
is an array it must be broadcastable to the given shape.
- 參數:
shape (int or list(int)) -- 輸出陣列的形狀。
vals (float or int or array) -- Values to fill the array with.
dtype (Dtype, optional) -- Data type of the output array. If
unspecified the output type is inferred from vals.
- 回傳值:
The output array with the specified shape and values.
- 回傳值型別:
array