This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / stats / _qmc / _lloyd_iteration

function

scipy.stats._qmc:_lloyd_iteration

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_qmc.py:2671

Signature

def _lloyd_iteration(sample: np.ndarray, decay: float, qhull_options: str) → np.ndarray

Summary

Lloyd-Max algorithm iteration.

Extended Summary

Based on the implementation of Stéfan van der Walt:

https://github.com/stefanv/lloyd

which is:

Copyright (c) 2021-04-21 Stéfan van der Walt https://github.com/stefanv/lloyd MIT License

Parameters

sample : array_like (n, d)

The sample to iterate on.

decay : float

Relaxation decay. A positive value would move the samples toward their centroid, and negative value would move them away. 1 would move the samples to their centroid.

qhull_options : str

Additional options to pass to Qhull. See Qhull manual for details. (Default: "Qbb Qc Qz Qj Qx" for ndim > 4 and "Qbb Qc Qz Qj" otherwise.)

Returns

sample : array_like (n, d)

The sample after an iteration of Lloyd's algorithm.

Aliases

  • scipy.stats._qmc._lloyd_iteration