Constructor#

Basic constructors#

variable([dimensions, asarray, dtype, ...])

Construct variables that can be used to construct polynomials.

polynomial([poly_like, names, dtype, allocation])

Attempt to cast an object into a polynomial array.

aspolynomial(poly_like[, names, dtype])

Convert the input to an polynomial array.

monomial(start[, stop, dimensions, ...])

Create an polynomial monomial expansion.

symbols([names, asarray, dtype, allocation])

Construct symbol variables.

polynomial_from_attributes(exponents, ...[, ...])

Construct polynomial from polynomial attributes.

ndpoly.from_attributes(exponents, coefficients)

Construct polynomial from polynomial attributes.

polynomial_from_roots(seq_of_zeros[, dtype])

Find the coefficients of a polynomial with the given sequence of roots.

roots(poly)

Return the roots of a polynomial.

Array creation#

diag(y[, k])

Extract a diagonal or construct a diagonal array.

diagonal(a[, offset, axis1, axis2])

Return specified diagonals.

full(shape, fill_value[, dtype, order])

Return a new array of given shape and type, filled with fill_value.

full_like(a, fill_value[, dtype, order, ...])

Return a full array with the same shape and type as a given array.

ones(shape[, dtype, order])

Return a new array of given shape and type, filled with ones.

ones_like(a[, dtype, order, subok, shape])

Return an array of ones with the same shape and type as a given array.

zeros(shape[, dtype, order])

Return a new array of given shape and type, filled with zeros.

zeros_like(a[, dtype, order, subok, shape])

Return an array of zeros with the same shape and type as a given array.

Save/Load#

loadtxt(fname[, dtype, comments, delimiter, ...])

Load data from a text file.

savetxt(fname, X[, fmt, delimiter, newline, ...])

Save a polynomial array to a text file.