Skip to main content

Nada Array Functions

FunctionSignatureDescription
array[i]itemRetrieve an item from the array.
array[i] = ...key, valueSet an item in the array.
addother: AnyPerform element-wise addition with broadcasting.
subother: AnyPerform element-wise subtraction with broadcasting.
mulother: AnyPerform element-wise multiplication with broadcasting.
divideother: AnyPerform element-wise division with broadcasting.
matmulother: NadaArrayPerform matrix multiplication with another NadaArray.
dotother: NadaArrayCompute the dot product between two NadaArray objects.
hstackother: NadaArrayHorizontally stack two NadaArray objects.
vstackother: NadaArrayVertically stack two NadaArray objects.
revealReveal the elements of the array.
applyfunc: Callable[[Any], Any]Apply a Python function element-wise to the array.
meanaxis=None, dtype=None, out=NoneCompute the mean along the specified axis.
outputparty: Party, prefix: strGenerate a list of Output objects for each element in the NadaArray.
arraydims: Sequence[int], party: Party, prefix: str, nada_type: typeCreate a NadaArray with specified dimensions and element type.
randomdims: Sequence[int], nada_type: type = SecretIntegerCreate a random NadaArray with specified dimensions and element type.
lenGet the length of the NadaArray.
emptyCheck if the NadaArray is empty.
dtypeGet the data type of the NadaArray.
is_rationalCheck if the NadaArray contains rationals.
is_integerCheck if the NadaArray contains signed integers.
is_unsigned_integerCheck if the NadaArray contains unsigned integers.
is_booleanCheck if the NadaArray contains booleans.
str(array)Get a string representation of the NadaArray.
debugarray: np.ndarrayGet a debug representation of the NadaArray.