Add docs for tiledb.save and tiledb.open
@@ -4,6 +4,16 @@ from tiledb.libtiledb import *
import numpy as np
def open(uri, key=None, attr=None, mode='r', config=None):
+ """
+ Open a TileDB array at the given URI
+
+ :param uri: any TileDB supported URI
+ :param key: encryption key, str or None
+ :param str mode: (default 'r') Open the array object in read 'r' or write 'w' mode
+ :param attr: attribute name to select from a multi-attribute array, str or None
+ :param config: TileDB config dictionary, dict or None
+ :return:
+ """
if config:
cfg = tiledb.Config(config)
ctx = tiledb.Ctx(cfg)
@@ -23,6 +33,15 @@ def open(uri, key=None, attr=None, mode='r', config=None):
def save(uri, array, config=None, **kw):
+ """
+ Save array-like object at the given URI.
+
+ :param uri: str or None
+ :param array: array-like object convertible to NumPy
+ :param config: TileDB config dictionary, dict or None
+ :param kw: optional keyword args will be forwarded to tiledb.Array constructor
+ :return:
+ """
if not isinstance(array, np.ndarray):
raise ValueError("expected NumPy ndarray, not '{}'".format(type(array)))
if config:
@@ -61,6 +80,9 @@ def empty_like(uri, arr, config=None, key=None, tile=None):
def from_numpy(uri, array, ctx=default_ctx(), **kw):
+ """
+ Convenience method, see `tiledb.DenseArray.from_numpy`
+ """
if not isinstance(array, np.ndarray):
raise Exception("from_numpy is only currently supported for numpy.ndarray")
