You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first link above points to the documentation for the older polynomial module, whereas the second link points to the new polynomial package. The API between these two is not consistent - the polynomial package expects coefficient arrays in ascending order whereas the module has them in the opposite order. np.polydiv is a function from the polynomial module so is consistent with the older API.
This is indeed quite confusing, so suggestions on how to improve the situation are very welcome!
Well what I was thinking was we can simply take polynomial as input in polydiv, as in np.polynomial and then just simlply reverse the 1d array and then the rest of the polydiv function can be performed.
Activity
rossbar commentedon Dec 18, 2020
The first link above points to the documentation for the older polynomial module, whereas the second link points to the new polynomial package. The API between these two is not consistent - the polynomial package expects coefficient arrays in ascending order whereas the module has them in the opposite order.
np.polydivis a function from the polynomial module so is consistent with the older API.This is indeed quite confusing, so suggestions on how to improve the situation are very welcome!
rossbar commentedon Dec 18, 2020
FWIW there is an attempt at summarizing the situation in the reference guide.
ayush1300 commentedon Dec 21, 2020
Well what I was thinking was we can simply take polynomial as input in polydiv, as in np.polynomial and then just simlply reverse the 1d array and then the rest of the polydiv function can be performed.