Class NDChebyshev
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
NumPy's numpy.polynomial.chebyshev.Chebyshev: a Chebyshev series of the first kind: c[0]·T₀(x) + c[1]·T₁(x) + …, with a domain (default [-1, 1]) mapped onto a
window (default [-1, 1]). Arithmetic (+ - * / %, __floordiv__(object),
__divmod__(object), __pow__(object)), evaluation (__call__(object)), calculus
(integ(int, object, object), deriv(int)), roots, fitting (fit(object, object, object, object, object, bool, object, object, string)), conversion between bases
(convert(object, Type, object), cast(NDPolyBase, object, object)) and printing, all as NumPy 2.4.2 has them.
public sealed class NDChebyshev : NDPolyBase, IDisposable, IFormattable
- Inheritance
-
NDChebyshev
- Implements
- Inherited Members
Remarks
See NDPolyBase for the ownership rule (dispose every series, operator results included) and
the C# spelling of NumPy's protocol. NumPy's class object Chebyshev is Class (also every
series' __class__): the class attributes domain, window, maxpower
and basis_name keep NumPy's names there. The class methods (identity(object, object, string),
basis(object, object, object, string), fromroots(object, object, object, string), fit(object, object, object, object, object, bool, object, object, string), cast(NDPolyBase, object, object)) are static members.
https://numpy.org/doc/stable/reference/generated/numpy.polynomial.chebyshev.Chebyshev.html
Constructors
NDChebyshev(object, object, object, string)
NumPy's Chebyshev(coef, domain=None, window=None, symbol='x'): the series with coefficients
coef (low degree first), converted and copied as polyutils.as_series does.
public NDChebyshev(object coef, object domain = null, object window = null, string symbol = "x")
Parameters
coefobjectThe coefficients: a 1-D array_like (a C# array, an NDArray, a Python list / tuple, a scalar); integers become float64 (a bool array has no common type), a float16 / float32 / complex array keeps its dtype.
domainobjectThe domain (two numbers), or null for the class default (shared, not copied).
windowobjectThe window (two numbers), or null for the class default.
symbolstringThe variable's name for printing: a Python identifier.
Exceptions
- ValueError
Coefficient array is empty,Coefficient array is not 1-d,Coefficient arrays have no common type(a bool array),Domain has wrong number of elements.,Window has wrong number of elements.,Symbol string must be a valid Python identifier.- TypeError
Symbol must be a non-empty string(a null symbol).- NotSupportedException
Coefficients NumPy keeps as an OBJECT array (None, a Python int past uint64, a list holding a non-number).
Properties
Class
NumPy's class object Chebyshev: its class attributes under NumPy's names — NDChebyshev.Class.domain is
NumPy's Chebyshev.domain, likewise window, maxpower and basis_name — and its
name / module. The same object as __class__ of every Chebyshev
series. Footgun: its attributes are process-wide state, read by every series of the class without its own
(see NDPolyClass).
public static NDPolyClass Class { get; }
Property Value
Methods
Deconstruct(out NDChebyshev, out (NDArray residuals, NDArray rank, NDArray singular_values, NDArray rcond))
NumPy's series, [resid, rank, sv, rcond] = Chebyshev.fit(..., full=True): the fitted series and lstsq's
statistics (the residual sums of squares, the rank, the singular values, the rcond used).
public void Deconstruct(out NDChebyshev series, out (NDArray residuals, NDArray rank, NDArray singular_values, NDArray rcond) status)
Parameters
seriesNDChebyshevThis series.
status(NDArray, NDArray, NDArray, NDArray)The statistics, in NumPy's order. The caller owns them (no scope tracks them; the garbage collector releases them).
Exceptions
- ValueError
The series is not the result of a
fit(..., full: true)(NumPy's series does not unpack either).
__divmod__(object)
NumPy's divmod(p, other) (divmod): the quotient and the remainder.
public (NDChebyshev quo, NDChebyshev rem) __divmod__(object other)
Parameters
otherobjectThe divisor.
Returns
- (NDChebyshev quo, NDChebyshev rem)
(quo, rem), two new series of this class.
Exceptions
- TypeError
See NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand).
- ZeroDivisionError
A zero divisor.
__floordiv__(object)
NumPy's p // other (floordiv, then CPython's fallbacks): the quotient of
divmod(p, other).
public override NDChebyshev __floordiv__(object other)
Parameters
otherobjectThe divisor: a series of this class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The quotient series.
Exceptions
- TypeError
See NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand).
- ZeroDivisionError
A zero divisor.
__pow__(object)
NumPy's p ** n (pow): self._pow(self.coef, n, maxpower=self.maxpower) — no
try/except, so every error of the power argument propagates — in a new series.
public override NDChebyshev __pow__(object power)
Parameters
powerobjectThe power: a non-negative integer (Python's
int(pow)andpower != powdecide: 2.0 and True work, 2.5 and '2' do not).
Returns
- NDChebyshev
The new series.
Exceptions
- ValueError
Power must be a non-negative integer.,Power is too large(above maxpower), int()'s ValueErrors.- TypeError
int() refuses the power:
int() argument must be a string, a bytes-like object or a real number, not 'complex'(a series: its class name),only 0-dimensional arrays can be converted to Python scalars.- OverflowError
An infinite power.
__rdivmod__(object)
NumPy's divmod(other, p) (rdivmod).
public (NDChebyshev quo, NDChebyshev rem) __rdivmod__(object other)
Parameters
otherobjectThe dividend.
Returns
- (NDChebyshev quo, NDChebyshev rem)
(quo, rem), two new series of this class.
Exceptions
- TypeError
See NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand).
- ZeroDivisionError
This series is zero.
__rfloordiv__(object)
NumPy's other // p (rfloordiv): the quotient of divmod(other, p).
public override NDChebyshev __rfloordiv__(object other)
Parameters
otherobjectThe dividend.
Returns
- NDChebyshev
The quotient series.
Exceptions
- TypeError
See NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand).
- ZeroDivisionError
This series is zero.
basis(object, object, object, string)
NumPy's Chebyshev.basis(deg, domain=None, window=None, symbol='x'): the basis polynomial of degree
deg (coefficients [0, …, 0, 1]).
public static NDChebyshev basis(object deg, object domain = null, object window = null, string symbol = "x")
Parameters
degobjectThe degree: a non-negative integer (Python's
int()and!=decide).domainobjectThe domain, or null for the class default.
windowobjectThe window, or null for the class default.
symbolstringThe symbol.
Returns
- NDChebyshev
The basis series.
Exceptions
- ValueError
deg must be non-negative integer.- TypeError
int()refusesdeg.
cast(NDPolyBase, object, object)
NumPy's Chebyshev.cast(series, domain=None, window=None): series converted to this class
(series.convert(domain, Chebyshev, window)).
public static NDChebyshev cast(NDPolyBase series, object domain = null, object window = null)
Parameters
seriesNDPolyBaseThe series to convert (any of the six classes).
domainobjectThe domain, or null for the class default.
windowobjectThe window, or null for the class default.
Returns
- NDChebyshev
The converted series.
Exceptions
- AttributeError
seriesis null.
copy()
NumPy's copy(): self.class(self.coef, self.domain, self.window, self.symbol) — a new series
with copies of the coefficients, the domain and the window (a class default is copied too: the copy owns its
own).
public override NDChebyshev copy()
Returns
- NDChebyshev
The copy.
Exceptions
- ValueError
An assigned domain or window of the wrong length (the constructor's check).
cutdeg(object)
NumPy's cutdeg(deg): self.truncate(deg + 1) — the series cut to degree deg,
with Python's + on whatever deg is (a float 1.0 works, 1.5 fails truncate's integer
check, a str fails the +).
public override NDChebyshev cutdeg(object deg)
Parameters
degobjectThe degree: a non-negative integer (anything whose
+ 1truncate accepts).
Returns
- NDChebyshev
The new series.
Exceptions
- ValueError
size must be a positive integer.- TypeError
Python's
+refusesdeg(can only concatenate str (not "int") to str,unsupported operand type(s) for +: 'NoneType' and 'int'), orint()refuses the sum (an array of one or more dims).
deriv(int)
NumPy's deriv(m=1): {p}der(self.coef, m, scl) in a new series, with the map's scale as the chain
rule's factor (the derivative is taken in the window variable).
public override NDChebyshev deriv(int m = 1)
Parameters
mintThe order (≥ 0).
Returns
- NDChebyshev
The new series (the same domain and window).
Exceptions
- ValueError
The order of derivation must be non-negative.
fit(object, object, object, object, object, bool, object, object, string)
NumPy's Chebyshev.fit(x, y, deg, domain=None, rcond=None, full=False, w=None, window=None, symbol='x'): the
least-squares fit of this basis to the points, on a domain covering x by default (mapped onto the window, which
keeps the problem well conditioned).
public static NDChebyshev fit(object x, object y, object deg, object domain = null, object rcond = null, bool full = false, object w = null, object window = null, string symbol = "x")
Parameters
xobjectThe sample points (1-D).
yobjectThe values (1-D, or 2-D with one data set per column).
degobjectThe degree, or a 1-D list of the degrees to fit.
domainobjectnull: the smallest interval holding x (widened by 1 when x is constant); an empty list: the class default; otherwise the domain.
rcondobjectThe relative cutoff of small singular values, or null for
len(x)·eps.fullboolAlso keep lstsq's statistics:
var (s, (resid, rank, sv, rcond)) = NDChebyshev.fit(…, full: true).wobjectWeights (1-D), or null.
windowobjectThe window, or null for the class default.
symbolstringThe symbol.
Returns
- NDChebyshev
The fitted series (deconstructible into the series and the statistics when
full).
Exceptions
- ValueError
expected deg >= 0and the fit's other checks; the constructor's errors.- TypeError
The fit's argument errors (
expected 1D vector for x, …).- MissingBackendException
No LAPACK backend: lstsq needs
NumSharp.Interop.OpenBLAS.
fromroots(object, object, object, string)
NumPy's Chebyshev.fromroots(roots, domain=[], window=None, symbol='x'): the series
(x - r[0])·(x - r[1])·…, built in the window variable (fromroots(off + scl·roots) / scl**deg).
public static NDChebyshev fromroots(object roots, object domain, object window = null, string symbol = "x")
Parameters
rootsobjectThe roots (1-D).
domainobjectOmitted or an empty list: the class default (NumPy's
[]); null: the roots' own interval (NumPy's None,getdomain(roots)); otherwise the domain.windowobjectThe window, or null for the class default.
symbolstringThe symbol.
Returns
- NDChebyshev
The series.
Exceptions
- ValueError
Empty or non-1-d roots; a domain / window the constructor refuses.
- IndexError
An empty domain array (mapparms' indexing).
identity(object, object, string)
NumPy's Chebyshev.identity(domain=None, window=None, symbol='x'): the series whose value at every x is x (in
this basis, mapped through the domain and window).
public static NDChebyshev identity(object domain = null, object window = null, string symbol = "x")
Parameters
domainobjectThe domain, or null for the class default.
windowobjectThe window, or null for the class default.
symbolstringThe symbol.
Returns
- NDChebyshev
The identity series.
Exceptions
- ValueError
A domain / window the constructor refuses; an invalid symbol.
- IndexError
A domain or window shorter than two.
integ(int, object, object)
NumPy's integ(m=1, k=[], lbnd=None): the definite integral in a new series. NumPy integrates in the
WINDOW variable, so the lower bound is mapped there (lbnd = off + scl*lbnd, a NumPy scalar; 0 for None)
and every order is scaled by 1./scl — then {p}int(self.coef, m, k, lbnd, 1./scl).
public override NDChebyshev integ(int m = 1, object k = null, object lbnd = null)
Parameters
mintThe number of integrations (≥ 0).
kobjectThe integration constants (null for NumPy's
[]): a scalar or a sequence, at mostmof them, missing ones 0.lbndobjectThe lower bound in the DOMAIN variable: null for NumPy's None (the window's 0), or a scalar.
Returns
- NDChebyshev
The new series (the same domain and window).
Exceptions
- ValueError
The order of integration must be non-negative,Too many integration constants,lbnd must be a scalar.(an array bound).- TypeError
A sequence or str bound:
can't multiply sequence by non-int of type 'numpy.float64'(the scale's NumPy type); another object NumPy's object loop refuses.
interpolate(Func<NDArray, object[], object>, object, object, object)
NumPy's Chebyshev.interpolate(func, deg, domain=None, args=()): the Chebyshev series of degree
deg interpolating func at the Chebyshev points of the first kind mapped into
domain (chebinterpolate of lambda x: func(mapdomain(x, window, domain), *args)) —
close to the minimax approximation of a function continuous on the domain.
public static NDChebyshev interpolate(Func<NDArray, object[], object> func, object deg, object domain = null, object args = null)
Parameters
funcFunc<NDArray, object[], object>The function: called once, with the mapped points (a float64 array) and the unpacked
args; it returns the values at those points (anythingnp.dotaccepts).degobjectThe degree: an integer.
domainobjectThe interval: null for the class default
[-1, 1].argsobjectExtra arguments for
func(any Python iterable), or null for none.
Returns
- NDChebyshev
The interpolating series, on
domainwith the class window and symbol'x'.
Remarks
Exceptions
- TypeError
deg must be an int; the unpacking's errors; a null func.- ValueError
expected deg >= 0; a domain the constructor refuses (checked after the interpolation, as NumPy does).
trim(object)
NumPy's trim(tol=0): pu.trimcoef(self.coef, tol) in a new series — the trailing coefficients whose
magnitude is at most tol removed (all of them leaves one zero).
public override NDChebyshev trim(object tol)
Parameters
tolobjectThe tolerance: omitted for NumPy's default 0, or a Python / NumPy number (see
np.polynomial.polyutils.trimcoef). An explicit null is NumPy'stol=None, which trimcoef'stol < 0refuses.
Returns
- NDChebyshev
The new series.
Exceptions
- ValueError
tol must be non-negative.- TypeError
A tolerance that does not compare with 0 (complex, str, None).
truncate(object)
NumPy's truncate(size): isize = int(size); isize != size or isize < 1 raises; then the
first isize coefficients (all of them when there are fewer) in a new series.
public override NDChebyshev truncate(object size)
Parameters
sizeobjectThe length: a positive integer (Python's
int()and!=decide: 2.0 works, 2.5 and '2' do not).
Returns
- NDChebyshev
The new series.
Exceptions
- ValueError
size must be a positive integer; or int()'s own ValueError (a NaN, an unparsable str — a parsable one fails the!=).- TypeError
int() refuses
size(None, complex, a list, an array of one or more dims).- OverflowError
An infinity.
Operators
operator +(NDArray, NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(NDArray a, NDChebyshev b)
Parameters
aNDArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator +(NDChebyshev, NDArray)
NumPy's p + other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator +(NDChebyshev a, NDArray b)
Parameters
aNDChebyshevThe series.
bNDArrayA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The sum.
operator +(NDChebyshev, Array)
NumPy's p + seq for a C# array (p + new[] { 1.0, 2.0 }, NumPy's p + [1, 2]): an
overload of its own because C# would otherwise convert the array to an NDArray at the call
site and bind operator +(NDPolyBase, NDArray), leaving that temporary to the garbage
collector. The array is read as NumPy reads an ndarray operand.
public static NDChebyshev operator +(NDChebyshev a, Array b)
Parameters
aNDChebyshevThe series.
bArrayThe coefficients.
Returns
- NDChebyshev
The sum.
operator +(NDChebyshev, object)
NumPy's p + other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator +(NDChebyshev a, object b)
Parameters
aNDChebyshevThe series.
bobjectA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The sum.
operator +(NDChebyshev, object[])
NumPy's p + other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator +(NDChebyshev a, object[] b)
Parameters
aNDChebyshevThe series.
bobject[]A series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The sum.
operator +(NDChebyshev, string)
NumPy's p + "text", a TypeError as in NumPy: an overload of its own so the C# string reaches the
protocol as Python's str, not through NumSharp's string-to-char-array conversion (whose temporary would be
left to the garbage collector). Footgun: p + null is ambiguous between this overload and the
object[] one; NumPy's p + None is p + (object)null.
public static NDChebyshev operator +(NDChebyshev a, string b)
Parameters
aNDChebyshevThe series.
bstringThe text.
Returns
- NDChebyshev
Never: NumPy's TypeError.
operator +(Array, NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(Array a, NDChebyshev b)
Parameters
aArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator +(IList, NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(IList a, NDChebyshev b)
Parameters
aIListThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator +(object[], NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(object[] a, NDChebyshev b)
Parameters
aobject[]The other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator +(ITuple, NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(ITuple a, NDChebyshev b)
Parameters
aITupleThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator +(string, NDChebyshev)
NumPy's other + p: the other operand declines, then the series' radd.
public static NDChebyshev operator +(string a, NDChebyshev b)
Parameters
astringThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The sum.
operator /(NDArray, NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(NDArray a, NDChebyshev b)
Parameters
aNDArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator /(NDChebyshev, NDArray)
NumPy's p / other: only a number divides (p // number).
public static NDChebyshev operator /(NDChebyshev a, NDArray b)
Parameters
aNDChebyshevThe series.
bNDArrayA Python or NumPy number (not a bool).
Returns
- NDChebyshev
The quotient.
operator /(NDChebyshev, Array)
NumPy's p / seq for a C# array (p / new[] { 1.0, 2.0 }, NumPy's p / [1, 2]): an
overload of its own because C# would otherwise convert the array to an NDArray at the call
site and bind operator /(NDPolyBase, NDArray), leaving that temporary to the garbage
collector. The array is read as NumPy reads an ndarray operand.
public static NDChebyshev operator /(NDChebyshev a, Array b)
Parameters
aNDChebyshevThe series.
bArrayThe coefficients.
Returns
- NDChebyshev
The quotient.
operator /(NDChebyshev, object)
NumPy's p / other: only a number divides (p // number).
public static NDChebyshev operator /(NDChebyshev a, object b)
Parameters
aNDChebyshevThe series.
bobjectA Python or NumPy number (not a bool).
Returns
- NDChebyshev
The quotient.
operator /(NDChebyshev, object[])
NumPy's p / other: only a number divides (p // number).
public static NDChebyshev operator /(NDChebyshev a, object[] b)
Parameters
aNDChebyshevThe series.
bobject[]A Python or NumPy number (not a bool).
Returns
- NDChebyshev
The quotient.
operator /(NDChebyshev, string)
NumPy's p / "text", a TypeError as in NumPy: an overload of its own so the C# string reaches the
protocol as Python's str, not through NumSharp's string-to-char-array conversion (whose temporary would be
left to the garbage collector). Footgun: p / null is ambiguous between this overload and the
object[] one; NumPy's p / None is p / (object)null.
public static NDChebyshev operator /(NDChebyshev a, string b)
Parameters
aNDChebyshevThe series.
bstringThe text.
Returns
- NDChebyshev
Never: NumPy's TypeError.
operator /(Array, NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(Array a, NDChebyshev b)
Parameters
aArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator /(IList, NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(IList a, NDChebyshev b)
Parameters
aIListThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator /(object[], NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(object[] a, NDChebyshev b)
Parameters
aobject[]The other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator /(ITuple, NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(ITuple a, NDChebyshev b)
Parameters
aITupleThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator /(string, NDChebyshev)
NumPy's other / p: always CPython's TypeError (rtruediv declines every operand).
public static NDChebyshev operator /(string a, NDChebyshev b)
Parameters
astringThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
Never returns.
operator %(NDArray, NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(NDArray a, NDChebyshev b)
Parameters
aNDArrayThe dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator %(NDChebyshev, NDArray)
NumPy's p % other: the remainder of divmod(p, other).
public static NDChebyshev operator %(NDChebyshev a, NDArray b)
Parameters
aNDChebyshevThe series.
bNDArrayThe divisor.
Returns
- NDChebyshev
The remainder.
operator %(NDChebyshev, Array)
NumPy's p % seq for a C# array (p % new[] { 1.0, 2.0 }, NumPy's p % [1, 2]): an
overload of its own because C# would otherwise convert the array to an NDArray at the call
site and bind operator %(NDPolyBase, NDArray), leaving that temporary to the garbage
collector. The array is read as NumPy reads an ndarray operand.
public static NDChebyshev operator %(NDChebyshev a, Array b)
Parameters
aNDChebyshevThe series.
bArrayThe coefficients.
Returns
- NDChebyshev
The remainder.
operator %(NDChebyshev, object)
NumPy's p % other: the remainder of divmod(p, other).
public static NDChebyshev operator %(NDChebyshev a, object b)
Parameters
aNDChebyshevThe series.
bobjectThe divisor.
Returns
- NDChebyshev
The remainder.
operator %(NDChebyshev, object[])
NumPy's p % other: the remainder of divmod(p, other).
public static NDChebyshev operator %(NDChebyshev a, object[] b)
Parameters
aNDChebyshevThe series.
bobject[]The divisor.
Returns
- NDChebyshev
The remainder.
operator %(NDChebyshev, string)
NumPy's p % "text", a TypeError as in NumPy: an overload of its own so the C# string reaches the
protocol as Python's str, not through NumSharp's string-to-char-array conversion (whose temporary would be
left to the garbage collector). Footgun: p % null is ambiguous between this overload and the
object[] one; NumPy's p % None is p % (object)null.
public static NDChebyshev operator %(NDChebyshev a, string b)
Parameters
aNDChebyshevThe series.
bstringThe text.
Returns
- NDChebyshev
Never: NumPy's TypeError.
operator %(Array, NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(Array a, NDChebyshev b)
Parameters
aArrayThe dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator %(IList, NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(IList a, NDChebyshev b)
Parameters
aIListThe dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator %(object[], NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(object[] a, NDChebyshev b)
Parameters
aobject[]The dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator %(ITuple, NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(ITuple a, NDChebyshev b)
Parameters
aITupleThe dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator %(string, NDChebyshev)
NumPy's other % p: the series' rmod (a str's % formats first).
public static NDChebyshev operator %(string a, NDChebyshev b)
Parameters
astringThe dividend.
bNDChebyshevThe series.
Returns
- NDChebyshev
The remainder.
operator *(NDArray, NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(NDArray a, NDChebyshev b)
Parameters
aNDArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator *(NDChebyshev, NDArray)
NumPy's p * other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator *(NDChebyshev a, NDArray b)
Parameters
aNDChebyshevThe series.
bNDArrayA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The product.
operator *(NDChebyshev, Array)
NumPy's p * seq for a C# array (p * new[] { 1.0, 2.0 }, NumPy's p * [1, 2]): an
overload of its own because C# would otherwise convert the array to an NDArray at the call
site and bind operator *(NDPolyBase, NDArray), leaving that temporary to the garbage
collector. The array is read as NumPy reads an ndarray operand.
public static NDChebyshev operator *(NDChebyshev a, Array b)
Parameters
aNDChebyshevThe series.
bArrayThe coefficients.
Returns
- NDChebyshev
The product.
operator *(NDChebyshev, object)
NumPy's p * other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator *(NDChebyshev a, object b)
Parameters
aNDChebyshevThe series.
bobjectA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The product.
operator *(NDChebyshev, object[])
NumPy's p * other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator *(NDChebyshev a, object[] b)
Parameters
aNDChebyshevThe series.
bobject[]A series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The product.
operator *(NDChebyshev, string)
NumPy's p * "text", a TypeError as in NumPy: an overload of its own so the C# string reaches the
protocol as Python's str, not through NumSharp's string-to-char-array conversion (whose temporary would be
left to the garbage collector). Footgun: p * null is ambiguous between this overload and the
object[] one; NumPy's p * None is p * (object)null.
public static NDChebyshev operator *(NDChebyshev a, string b)
Parameters
aNDChebyshevThe series.
bstringThe text.
Returns
- NDChebyshev
Never: NumPy's TypeError.
operator *(Array, NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(Array a, NDChebyshev b)
Parameters
aArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator *(IList, NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(IList a, NDChebyshev b)
Parameters
aIListThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator *(object[], NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(object[] a, NDChebyshev b)
Parameters
aobject[]The other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator *(ITuple, NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(ITuple a, NDChebyshev b)
Parameters
aITupleThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator *(string, NDChebyshev)
NumPy's other * p: the series' rmul.
public static NDChebyshev operator *(string a, NDChebyshev b)
Parameters
astringThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The product.
operator -(NDArray, NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(NDArray a, NDChebyshev b)
Parameters
aNDArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev, NDArray)
NumPy's p - other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator -(NDChebyshev a, NDArray b)
Parameters
aNDChebyshevThe series.
bNDArrayA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev, Array)
NumPy's p - seq for a C# array (p - new[] { 1.0, 2.0 }, NumPy's p - [1, 2]): an
overload of its own because C# would otherwise convert the array to an NDArray at the call
site and bind operator -(NDPolyBase, NDArray), leaving that temporary to the garbage
collector. The array is read as NumPy reads an ndarray operand.
public static NDChebyshev operator -(NDChebyshev a, Array b)
Parameters
aNDChebyshevThe series.
bArrayThe coefficients.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev, object)
NumPy's p - other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator -(NDChebyshev a, object b)
Parameters
aNDChebyshevThe series.
bobjectA series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev, object[])
NumPy's p - other (see NumSharp.NDPolyBase.PyBinary(NumSharp.PyBinOp, in NumSharp.PyOperand, in NumSharp.PyOperand)).
public static NDChebyshev operator -(NDChebyshev a, object[] b)
Parameters
aNDChebyshevThe series.
bobject[]A series of the same class, a number, an array or a sequence of coefficients.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev, string)
NumPy's p - "text", a TypeError as in NumPy: an overload of its own so the C# string reaches the
protocol as Python's str, not through NumSharp's string-to-char-array conversion (whose temporary would be
left to the garbage collector). Footgun: p - null is ambiguous between this overload and the
object[] one; NumPy's p - None is p - (object)null.
public static NDChebyshev operator -(NDChebyshev a, string b)
Parameters
aNDChebyshevThe series.
bstringThe text.
Returns
- NDChebyshev
Never: NumPy's TypeError.
operator -(Array, NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(Array a, NDChebyshev b)
Parameters
aArrayThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(IList, NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(IList a, NDChebyshev b)
Parameters
aIListThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(object[], NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(object[] a, NDChebyshev b)
Parameters
aobject[]The other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(ITuple, NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(ITuple a, NDChebyshev b)
Parameters
aITupleThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(string, NDChebyshev)
NumPy's other - p: the series' rsub.
public static NDChebyshev operator -(string a, NDChebyshev b)
Parameters
astringThe other operand.
bNDChebyshevThe series.
Returns
- NDChebyshev
The difference.
operator -(NDChebyshev)
NumPy's -p.
public static NDChebyshev operator -(NDChebyshev a)
Parameters
aNDChebyshevThe series.
Returns
- NDChebyshev
The negated series.
operator +(NDChebyshev)
NumPy's +p: the series itself (pos returns self).
public static NDChebyshev operator +(NDChebyshev a)
Parameters
aNDChebyshevThe series.
Returns
- NDChebyshev
a.