full<T extends SizedNativeType> function

VARP full<T extends SizedNativeType>(
  1. List<int> shape,
  2. dynamic fillValue, {
  3. String order = "C",
})

full(shape, fill_value, dtype=None, order='C') Return a new var of given shape and type, filled with fill_value.

Parameters

shape : int or sequence of ints Shape of the new var, e.g., (2, 3) or 2. fill_value : scalar or var_like Fill value. dtype : data-type, optional The desired data-type for the var The default, None, means np.array(fill_value).dtype. order : {'C', 'F'}, optional Compatible with numpy.

Returns

out : var Var of fill_value with the given shape, dtype, and order.

Examples

np.full((2, 2), 10) var([10, 10, 10, 10])

Implementation

VARP full<T extends ffi.SizedNativeType>(
  List<int> shape,
  dynamic fillValue, {
  String order = "C",
}) {
  _orderAssert(order);
  return F.fill(_toVARP<int32>(shape), _toVARP<T>(fillValue));
}