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

[python] Cryptic error messages when creating arrays of disallowed types #3504

Open
mojaveazure opened this issue Dec 20, 2024 · 0 comments
Open

Comments

@mojaveazure
Copy link
Member

When trying to create a sparse or dense array of a disallowed type, the only message is "invalid pyarrow type string"; this should be updated to something more informative explaining that the type is disallowed by the SOMA spec

Example:

>>> shape = (200, 100)
>>> pyarr = numpy.array([""] * numpy.prod(shape), dtype=numpy.str_)
>>> pyarr.shape = shape
>>> atype = pyarrow.infer_type(pyarr[0])
>>> atype
DataType(string)
>>> arr = tiledbsoma.DenseNDArray.create(r.uri, type=atype, shape=pyarr.shape)
TypeError: Invalid pyarrow type string
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

1 participant