Module to manage the ndarray entries for sqlite.
- Source:
Methods
(static) getNdarrayMeta(data, dtypeopt, shapeopt, majoropt, ftypeopt) → {object}
Returns the ndarray metadata
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | Object | The input data buffer or data stream. |
|
dtype |
string |
<optional> |
The data type is of type |
shape |
array |
<optional> |
The shape of the data. |
major |
boolean |
<optional> |
The data major (true - row-major, false - column-major). |
ftype |
string |
<optional> |
The ndarray file type is of type |
- Source:
Returns:
- The ndarray metadata.
- Type
- object
(static) getNdarrayMeta(data, dtypeopt, shapeopt, majoropt, ftypeopt) → {object}
Returns the ndarray metadata.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | Object | The input data buffer or data stream. |
|
dtype |
string |
<optional> |
The data type is of type |
shape |
array |
<optional> |
The shape of the data. |
major |
boolean |
<optional> |
The data major (true - row-major, false - column-major). |
ftype |
string |
<optional> |
The ndarray file type is of type |
- Source:
Returns:
- The ndarray metadata.
- Type
- object
(static) getNdarrayObject(data, metaopt) → {NdarrayData}
Returns the ndarray object.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Buffer | object | The input data buffer or data stream. |
|
meta |
object |
<optional> |
The ndarray metadata. |
- Source:
Returns:
- The ndarray object with the structure.
{data: Buffer|Stream, dtype: string, shape: array, major: boolean, ftype: string}.
- Type
- NdarrayData
(static) getTypedArrayFromBuffer(buffer, dtype) → {object}
Returns the Javascript typed array from a buffer of a given type
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer | The data buffer. |
dtype |
string | The data type is of type |
- Source:
Returns:
- The typed array.
- Type
- object
(static) getTypedArrayFromBuffer(buffer, dtype) → {object}
Returns the Javascript typed array from a buffer of a given type.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer | The data buffer. |
dtype |
string | The data type is of type |
- Source:
Returns:
- The typed array.
- Type
- object
(static) getTypedBufferSize(numpyType, numpySize) → {number}
Returns the buffer size in bytes from a numpy type.
Parameters:
Name | Type | Description |
---|---|---|
numpyType |
string | The numpy array type. |
numpySize |
array | The numpy array size. |
- Source:
Returns:
- The buffer size.
- Type
- number
(async, static) readNdarrayMany(db, data, key, typeopt) → {Promise.<Array.<object>>}
Read ndarray documents from files.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
db |
object | The sqlite3 db object from module node-sqlite3. |
|
data |
Array.<object> | A list of all the data rows to read from files. |
|
key |
string | Array.<string> | The key(s) representing the ndarray(s). |
|
type |
boolean |
<optional> |
The return type (true - Buffer, false - Stream), default is true. |
- Source:
Returns:
- The modified data list with ndarray objects.
- Type
- Promise.<Array.<object>>
(async, static) writeNdarrayMany(db, data, key) → {Promise.<Array.<object>>}
Write ndarray documents to files.
Parameters:
Name | Type | Description |
---|---|---|
db |
object | The sqlite3 db object from module node-sqlite3. |
data |
Array.<object> | A list of all the data rows to write to file. |
key |
string | Array.<string> | The key(s) representing the ndarray(s). |
- Source:
Returns:
- The modified data list with ndarray metadata.
- Type
- Promise.<Array.<object>>