MCPcopy
hub / github.com/numpy/numpy / linspace

Method linspace

numpy/polynomial/_polybase.py:915–943  ·  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

913 return pu.mapdomain(roots, self.window, self.domain)
914
915 def linspace(self, n=100, domain=None):
916 """Return x, y values at equally spaced points in domain.
917
918 Returns the x, y values at `n` linearly spaced points across the
919 domain. Here y is the value of the polynomial at the points x. By
920 default the domain is the same as that of the series instance.
921 This method is intended mostly as a plotting aid.
922
923 Parameters
924 ----------
925 n : int, optional
926 Number of point pairs to return. The default value is 100.
927 domain : {None, array_like}, optional
928 If not None, the specified domain is used instead of that of
929 the calling instance. It should be of the form ``[beg,end]``.
930 The default is None which case the class domain is used.
931
932 Returns
933 -------
934 x, y : ndarray
935 x is equal to linspace(self.domain[0], self.domain[1], n) and
936 y is the series evaluated at element of x.
937
938 """
939 if domain is None:
940 domain = self.domain
941 x = np.linspace(domain[0], domain[1], n)
942 y = self(x)
943 return x, y
944
945 @classmethod
946 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_sort_bigendianMethod · 0.80
test_scalar_compareMethod · 0.80
test_sort_overlapMethod · 0.80
test_invalid_axisMethod · 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_sort_bigendianMethod · 0.64
test_scalar_compareMethod · 0.64
test_sort_overlapMethod · 0.64
test_invalid_axisMethod · 0.64
test_simpleMethod · 0.64