Skip to content

cluster1d

cluster1d(ar, order, tol, ids, avgs)

Categories: Indexing

Description

is used in sandbox/friedel.py to find clusters of peaks work in progress

Parameters

Name Description
ar Array of values to cluster.
avgs Output: average value of each cluster.
ids Output: cluster id for each element.
order Permutation that sorts ar ascending.
tol Distance tolerance for cluster membership.

Constraints

  • ar.format == 'd'
  • ( order.format == 'i' or order.format == 'l' )
  • order.n == ar.n
  • ( ids.format == 'i' or ids.format == 'l' )
  • ids.n == ar.n
  • avgs.format == 'd'
  • avgs.n == ar.n

Overloads

C function Condition
cluster1d always

Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)