Currently, addData() only accepts numpy.ndarray as things to insert as an ndarray.
This makes it impossible to add custom metadata/options, such as whether to compress the saved
ndarray or to save it as a Base64 string instead of a file.
We should make a new class called NDArray, which allows setting this option.
Example usage:
data = np.array([47, 32])
# before
db.addData([{"a": data}])
# after
ndarray = NDArray(data, saveFormat="base64")
db.addData([{"a": ndarray}])
Currently,
addData()
only acceptsnumpy.ndarray
as things to insert as anndarray
. This makes it impossible to add custom metadata/options, such as whether to compress the savedndarray
or to save it as a Base64 string instead of a file.We should make a new class called
NDArray
, which allows setting this option.Example usage: