array
mlte/value/types/array.py
Implementation of Array value.
Array
Bases: Value
Array implements the Value interface for a numpy array of values.
Source code in mlte/value/types/array.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
array = array
instance-attribute
Underlying values represented as numpy array.
__eq__(other)
Comparison between Array values.
Source code in mlte/value/types/array.py
68 69 70 71 72 |
|
__init__(metadata, array)
Initialize an Array instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata
|
EvidenceMetadata
|
The generating measurement's metadata |
required |
array
|
List[Any]
|
The numpy array. |
required |
Source code in mlte/value/types/array.py
24 25 26 27 28 29 30 31 32 33 |
|
from_model(model)
classmethod
Convert an array value model to its corresponding artifact.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
ArtifactModel
|
The model representation |
required |
Returns:
Type | Description |
---|---|
Array
|
The array value |
Source code in mlte/value/types/array.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
to_model()
Convert an array value artifact to its corresponding model.
Returns:
Type | Description |
---|---|
ArtifactModel
|
The artifact model |
Source code in mlte/value/types/array.py
35 36 37 38 39 40 41 42 43 44 45 46 47 |
|