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

type checking: allow numpy.ndarray when expecting Array(Float64) ? #446

Open
jgehrcke opened this issue Jul 26, 2024 · 2 comments
Open

type checking: allow numpy.ndarray when expecting Array(Float64) ? #446

jgehrcke opened this issue Jul 26, 2024 · 2 comments

Comments

@jgehrcke
Copy link

Hey, when bumping from 0.2.3 to 0.2.4 we now get

TypeMismatchError: Code: 53. Type mismatch in VALUES section. Expected Array(Float64) got <class 'numpy.ndarray'>

in code that worked with version 0.2.3. This is because this check was added: ae8aa4a#diff-2e1d5e4524de8a7ffab2ea70f503b827d6e34fe139f8f3531bd0b59c13eedd51R103

use_numpy=True in client settings does not fix the problem.

Converting the numpy array to a Python list works around the problem.

I wonder: a numpy array of floats is type-wise very close to Array(Float64). Should this pass validation?

@xzkostyan
Copy link
Member

Hi.

Can you provide snippet that raises this error?

@jgehrcke
Copy link
Author

jgehrcke commented Aug 8, 2024

Thank you for looking! I can't get to making a repro right now, but it's really a simple case: create column of type Array(Float64) and insert a list of numpy arrays (so that each row would be a numpy array).

It works (again) when setting types_check=False upon execute().

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