MCPcopy Create free account
hub / github.com/numpy/numpy / linspace

Method linspace

numpy/polynomial/_polybase.py:923–953  ·  view source on GitHub ↗

Return x, y values at equally spaced points in domain. Returns the x, y values at `n` linearly spaced points across the domain. Here y is the value of the polynomial at the points x. By default the domain is the same as that of the series instance. This method is in

(self, n=100, domain=None)

Source from the content-addressed store, hash-verified

921 return pu.mapdomain(roots, self.window, self.domain)
922
923 def linspace(self, n=100, domain=None):
924 """Return x, y values at equally spaced points in domain.
925
926 Returns the x, y values at `n` linearly spaced points across the
927 domain. Here y is the value of the polynomial at the points x. By
928 default the domain is the same as that of the series instance.
929 This method is intended mostly as a plotting aid.
930
931 .. versionadded:: 1.5.0
932
933 Parameters
934 ----------
935 n : int, optional
936 Number of point pairs to return. The default value is 100.
937 domain : {None, array_like}, optional
938 If not None, the specified domain is used instead of that of
939 the calling instance. It should be of the form ``[beg,end]``.
940 The default is None which case the class domain is used.
941
942 Returns
943 -------
944 x, y : ndarray
945 x is equal to linspace(self.domain[0], self.domain[1], n) and
946 y is the series evaluated at element of x.
947
948 """
949 if domain is None:
950 domain = self.domain
951 x = np.linspace(domain[0], domain[1], n)
952 y = self(x)
953 return x, y
954
955 @classmethod
956 def fit(cls, x, y, deg, domain=None, rcond=None, full=False, w=None,

Callers 15

matplotlib2.pyFile · 0.80
test_VonMises_rangeMethod · 0.80
test_VonMises_rangeMethod · 0.80
test_vonmises_rangeMethod · 0.80
test_trapz_matrixFunction · 0.80
test_sort_bigendianMethod · 0.80
test_scalar_compareMethod · 0.80
test_invalid_axisMethod · 0.80
test_simpleMethod · 0.80
test_mirrorMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_VonMises_rangeMethod · 0.64
test_VonMises_rangeMethod · 0.64
test_vonmises_rangeMethod · 0.64
test_trapz_matrixFunction · 0.64
test_sort_bigendianMethod · 0.64
test_scalar_compareMethod · 0.64
test_invalid_axisMethod · 0.64
test_simpleMethod · 0.64
test_mirrorMethod · 0.64
test_circularMethod · 0.64