MCPcopy Index your code
hub / github.com/numpy/numpy / roots

Method roots

numpy/polynomial/_polybase.py:900–913  ·  view source on GitHub ↗

Return the roots of the series polynomial. Compute the roots for the series. Note that the accuracy of the roots decreases the further outside the `domain` they lie. Returns ------- roots : ndarray Array containing the roots of the series.

(self)

Source from the content-addressed store, hash-verified

898 return self.__class__(coef, self.domain, self.window, self.symbol)
899
900 def roots(self):
901 """Return the roots of the series polynomial.
902
903 Compute the roots for the series. Note that the accuracy of the
904 roots decreases the further outside the `domain` they lie.
905
906 Returns
907 -------
908 roots : ndarray
909 Array containing the roots of the series.
910
911 """
912 roots = self._roots(self.coef)
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.

Callers 1

test_rootsFunction · 0.45

Calls 1

_rootsMethod · 0.95

Tested by 1

test_rootsFunction · 0.36