mindelec.geometry.PartSamplingConfig

class mindelec.geometry.PartSamplingConfig(size, random_sampling=True, sampler='uniform', random_merge=True, with_normal=False)[source]

Definition of partial sampling configuration.

Parameters
  • size (Union[int, tuple[int], list[int]]) – number of sampling points.

  • random_sampling (bool) – Specifies whether randomly sampling points. Default: True.

  • sampler (str) – method for random sampling. Default: uniform.

  • random_merge (bool) – Specifies whether randomly merge coordinates of different dimensions. Default: True.

  • with_normal (bool) – Specifies whether generating the normal vectors of the boundary. Default: False.

Raises

TypeError – size is not int number when random sampling.

Supported Platforms:

Ascend

Examples

>>> from mindelec.geometry import PartSamplingConfig
>>> partsampling = PartSamplingConfig(100, True, "uniform", True, True)