opendp.extras.numpy package#
Module contents#
This module requires extra installs: pip install opendp[numpy]
For convenience, all the functions of this module are also available from opendp.prelude
.
We suggest importing under the conventional name dp
:
>>> import opendp.prelude as dp
The methods of this module will then be accessible at dp.numpy
.
- opendp.extras.numpy.array2_domain(*, norm=None, p=None, origin=None, size=None, num_columns=None, T=None)[source]#
Construct a Domain representing 2-dimensional numpy arrays.
- Parameters:
norm (float | None) – each row in x is bounded by the norm
p (Literal[1, 2, None]) – designates L`p` norm
origin – center of the norm region. Assumed to be at zero
size (int | None) – number of rows in data
num_columns (int | None) – number of columns in the data
T (RuntimeTypeDescriptor | None) – atom type
- Return type: