numpoly.full#
- numpoly.full(shape: int | Sequence[int], fill_value: numpoly.typing.PolyLike, dtype: DTypeLike | None = None, order: str = 'C') ndpoly[source]#
Return a new array of given shape and type, filled with fill_value.
- Args:
- shape:
Shape of the new array, e.g.,
(2, 3)or2.- fill_value:
Fill value. Must be broadcast compatible with shape.
- dtype:
The desired data-type for the array The default, None, means inherit from fill_value.
- order:
Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory. Valid values: “C”, “F”.
- Return:
Array of fill_value with the given shape, dtype, and order.
- Example:
>>> numpoly.full((2, 4), 4) polynomial([[4, 4, 4, 4], [4, 4, 4, 4]]) >>> q0 = numpoly.variable() >>> numpoly.full(3, q0**2-1) polynomial([q0**2-1, q0**2-1, q0**2-1])