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

Method roots

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

906 return self.__class__(coef, self.domain, self.window, self.symbol)
907
908 def roots(self):
909 """Return the roots of the series polynomial.
910
911 Compute the roots for the series. Note that the accuracy of the
912 roots decreases the further outside the `domain` they lie.
913
914 Returns
915 -------
916 roots : ndarray
917 Array containing the roots of the series.
918
919 """
920 roots = self._roots(self.coef)
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.

Callers 1

test_rootsFunction · 0.45

Calls 1

_rootsMethod · 0.95

Tested by 1

test_rootsFunction · 0.36