-
Notifications
You must be signed in to change notification settings - Fork 34
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
HL API additions for dask #129
Conversation
tiledb/libtiledb.pyx
Outdated
check_error(ctx, | ||
tiledb_vfs_fh_is_closed(ctx.ptr, self.ptr, &isclosed)) | ||
if not isclosed: | ||
with nogil: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like the behavior we want, need to be careful about resource use here:
https://cython.readthedocs.io/en/latest/src/userguide/extension_types.html#controlling-deallocation-and-garbage-collection-in-cpython
This commit adds an 'attr` specifier to DenseArray, which is used to open multi-attribute array as a single-attribute view. Needed for use-cases which do not support multi-attribute arrays. - Add pickle/unpickle support for DenseArray - Add serialization for Config so that head node can control worker node thread settings.
- tiledb.{open,save}: convenience functions to load and save an array - tiledb.schema_like: create a schema from an existing numpy array or {dtype, shape} - empty_like: create a writable array based on specifiers to 'schema_like', but do not materialize anything in memory.
Some comments, otherwise it lgtm |
🎉 |
This PR contains
rework DenseArray to support single-attribute view on a multi-attribute array
set of API additions, motivated by dask support (but hopefully generally useful):
open
,save
from_numpy
to allow use as simplytiledb.from_numpy
Dim
,Domain
)schema_like
: create ArraySchema based on a numpy ndarray template, or numpy-styleshape
anddtype
kwargsempty_like
: returns a writable, emtpy array similar to an existing ndarray-like object (.dtype
,.shape
).basic CI for dask integration to make sure we don't break that here, going forward