Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in BezierSpline #316

Open
bkp7 opened this issue Jan 14, 2025 · 1 comment
Open

Bug in BezierSpline #316

bkp7 opened this issue Jan 14, 2025 · 1 comment

Comments

@bkp7
Copy link

bkp7 commented Jan 14, 2025

There is a bug in the BezierSpline.predict code (no bug in either the Linear or Cubic versions). It fails if the target_x is of type s32. It works fine if the target_x is f32.

This variation on the documented example fails:

iex> x = Nx.iota({4})
iex> y = Nx.tensor([2.0, 0.0, 1.0, 0.5])
iex> model = Scholar.Interpolation.BezierSpline.fit(x, y)
iex> Scholar.Interpolation.BezierSpline.predict(model, Nx.tensor([3]))
@josevalim
Copy link
Contributor

I believe this is fixed as of #311. Can you please try main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants