We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In both NumPy and CASA, booleans are represented by a byte (8-bits). However, Arrow represents booleans with a single bit.
This means that, in the case of np.bool_, this conversion is not a zero-copy:
np.bool_
arcae/src/arcae/lib/arrow_tables.pyx
Lines 242 to 243 in 8d1da1b
This means that it's not possible pass NumPy bool arrays as getcol result arguments, or as putcol data arguments.
It's easy enough to work around this by passing data.astype(np.uint8) in these instances, as arcae represents CASA booleans as arrow:uint8()
data.astype(np.uint8)
arrow:uint8()
arcae/cpp/arcae/type_traits.h
Lines 58 to 64 in 8d1da1b
but it'd probably be convenient for the user to do this within arcae itself, during the numpy <--> arrow conversion process.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In both NumPy and CASA, booleans are represented by a byte (8-bits). However, Arrow represents booleans with a single bit.
This means that, in the case of
np.bool_
, this conversion is not a zero-copy:arcae/src/arcae/lib/arrow_tables.pyx
Lines 242 to 243 in 8d1da1b
This means that it's not possible pass NumPy bool arrays as getcol result arguments, or as putcol data arguments.
It's easy enough to work around this by passing
data.astype(np.uint8)
in these instances, as arcae represents CASA booleans asarrow:uint8()
arcae/cpp/arcae/type_traits.h
Lines 58 to 64 in 8d1da1b
but it'd probably be convenient for the user to do this within arcae itself, during the numpy <--> arrow conversion process.
The text was updated successfully, but these errors were encountered: