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

load(file[, mmap_mode, allow_pickle, …])

Load polynomial or pickled objects from .np{y,z} or pickled files.

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

Load data from a text file.

save(file, arr[, allow_pickle, fix_imports])

Save polynomial array to a binary file in NumPy .npy format.

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

Save a polynomial array to a text file.

savez(file, *args, **kwargs)

Save several arrays into a single file in uncompressed .npz format.

savez_compressed(file, *args, **kwargs)

Save several arrays into a single file in uncompressed .npz format.