[go: up one dir, main page]

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

Casting issue in some bases evaluation #1

Open
dperdios opened this issue Apr 7, 2024 · 2 comments
Open

Casting issue in some bases evaluation #1

dperdios opened this issue Apr 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dperdios
Copy link
Collaborator
dperdios commented Apr 7, 2024

Some b-spline bases (esp. of high degrees) have casting issues (returning arrays with the wrong data type). Probably comes from the fact that there are operations with Python integers.

@dperdios dperdios added the bug Something isn't working label Apr 7, 2024
@dperdios dperdios self-assigned this Apr 7, 2024
@pagarcia
Copy link
Collaborator
pagarcia commented Apr 8, 2024

I guess you refer to this issue?

Only when using basis "bspline8" and "bspline9", there is the following error:

    raise ValueError("Coordinates and data have different floating precisions.")
ValueError: Coordinates and data have different floating precisions.

@dperdios
Copy link
Collaborator Author
dperdios commented Apr 8, 2024

No this is an intended error raised if the user provides data and coordinates with different floating precisions. For now it was decided to enforce it strictly (i.e., throwing an error). It may be subject to automatic casting as per the TODO comment above.

The current issue concerns a casting rule from NumPy that may convert a float32 array to float64 depending on the order of operations with a Python integer for instance. Still need a bit of investigation and read what are best practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants