Constructors
- openfhe_numpy.tensor.constructors.array(cc, data, batch_size=-1, order=ROW_MAJOR, type=DataType.CIPHERTEXT, mode='repeat', package={}, public_key=None, **kwargs)[source]
Construct either a ciphertext or plaintext (CTArray/PTArray) from raw input data.
- Parameters:
cc (CryptoContext) – The OpenFHE CryptoContext.
data (matrix/vector/int)
batch_size (int) – Number of total plaintext batch_size.
order (int) – Encoding order: ArrayEncodingType.ROW_MAJOR or COL_MAJOR.
type (str) – DataType.CIPHERTEXT or PLAINTEXT.
public_key (optional) – Public key needed for encryption if the output is encrypted
Returns –
A matrix has a dimension of m x n (m rows x n cols)
A vector is considered as n x 1 matrix
A number is considered as a vector with duplicated entries: [1 1 1 1]
-------
Object (FHETensor)
mode (str)
package (dict)
- Return type: