Python: Use polyval to predict X passing Y
问题 I have 2 sets of points (X, Y). I want to: Use polifit to fit the line Given a Y predict an X This is the dataset: X Y -0.00001 5.400000e-08 -0.00001 5.700000e-08 0.67187 1.730000e-07 1.99997 9.150000e-07 2.67242 1.582000e-06 4.00001 3.734000e-06 4.67193 5.414000e-06 5.99998 9.935000e-06 6.67223 1.311300e-05 8.00000 2.102900e-05 Which looks like this: I have seen numpy has the function polyval. But here you pass an X and get a y. How do i reverse it. 回答1: As I said in the comments, you can