# encoding: utf-8
# module dipy.reconst.recspeed
# from C:\Users\xukai\Downloads\发票2\venv\Lib\site-packages\dipy\reconst\recspeed.cp311-win_amd64.pyd
# by generator 1.147
""" Optimized routines for creating voxel diffusion models """

# imports
import builtins as __builtins__ # <module 'builtins' (built-in)>
import numpy as np # C:\Users\xukai\Downloads\发票2\venv\Lib\site-packages\numpy\__init__.py

# functions

def adj_to_countarrs(*args, **kwargs): # real signature unknown
    """
    Convert adjacency sequence to counts and flattened indices
    
        We use this to provide expected input to ``argmax_from_countarrs``
    
        Parameters
        ----------
        adj_indices : sequence
           length V sequence of sequences, where sequence ``i`` contains the
           neighbors of a particular vertex.
    
        Returns
        -------
        counts : (V,) array
           Number of neighbors for each vertex
        adj_inds : (n,) array
           flat array containing `adj_indices` unrolled as a vector
    """
    pass

def argmax_from_adj(*args, **kwargs): # real signature unknown
    """
    Indices of local maxima from `vals` given adjacent points
    
        Parameters
        ----------
        vals : (N,) array, dtype np.float64
           values at all vertices referred to in either of `vertex_inds` or
           `adj_inds`'
        vertex_inds : (V,) array
           indices into `vals` giving vertices that may be local maxima.
        adj_inds : sequence
           For every vertex in ``vertex_inds``, the indices (into `vals`) of
           the neighboring points
    
        Returns
        -------
        inds : (M,) array
           Indices into `vals` giving local maxima of vals, given topology
           from `adj_inds`, and restrictions from `vertex_inds`.  Inds are
           returned sorted by value at that index - i.e. smallest value (at
           index) first.
    """
    pass

def argmax_from_countarrs(*args, **kwargs): # real signature unknown
    """
    Indices of local maxima from `vals` from count, array neighbors
    
        Parameters
        ----------
        vals : (N,) array, dtype float
           values at all vertices referred to in either of `vertex_inds` or
           `adj_inds`'
        vertinds : (V,) array, dtype uint32
           indices into `vals` giving vertices that may be local maxima.
        adj_counts : (V,) array, dtype uint32
           For every vertex ``i`` in ``vertex_inds``, the number of
           neighbors for vertex ``i``
        adj_inds : (P,) array, dtype uint32
           Indices for neighbors for each point.  ``P=sum(adj_counts)``
    
        Returns
        -------
        inds : (M,) array
           Indices into `vals` giving local maxima of vals, given topology
           from `adj_counts` and `adj_inds`, and restrictions from
           `vertex_inds`.  Inds are returned sorted by value at that index -
           i.e. smallest value (at index) first.
    """
    pass

def le_to_odf(*args, **kwargs): # real signature unknown
    """ odf for interpolated Laplacian normalized signal """
    pass

def local_maxima(*args, **kwargs): # real signature unknown
    """
    Local maxima of a function evaluated on a discrete set of points.
    
        If a function is evaluated on some set of points where each pair of
        neighboring points is an edge in edges, find the local maxima.
    
        Parameters
        ----------
        odf : array, 1d, dtype=double
            The function evaluated on a set of discrete points.
        edges : array (N, 2)
            The set of neighbor relations between the points. Every edge, ie
            `edges[i, :]`, is a pair of neighboring points.
    
        Returns
        -------
        peak_values : ndarray
            Value of odf at a maximum point. Peak values is sorted in descending
            order.
        peak_indices : ndarray
            Indices of maximum points. Sorted in the same order as `peak_values` so
            `odf[peak_indices[i]] == peak_values[i]`.
    
        Notes
        -----
        A point is a local maximum if it is > at least one neighbor and >= all
        neighbors. If no points meet the above criteria, 1 maximum is returned such
        that `odf[maximum] == max(odf)`.
    
        See Also
        --------
        dipy.core.sphere
    """
    pass

def proc_reco_args(*args, **kwargs): # real signature unknown
    pass

def remove_similar_vertices(*args, **kwargs): # real signature unknown
    """
    Remove vertices that are less than `theta` degrees from any other
    
        Returns vertices that are at least theta degrees from any other vertex.
        Vertex v and -v are considered the same so if v and -v are both in
        `vertices` only one is kept. Also if v and w are both in vertices, w must
        be separated by theta degrees from both v and -v to be unique.
    
        Parameters
        ----------
        vertices : (N, 3) ndarray
            N unit vectors.
        theta : float
            The minimum separation between vertices in degrees.
        return_mapping : {False, True}, optional
            If True, return `mapping` as well as `vertices` and maybe `indices`
            (see below).
        return_indices : {False, True}, optional
            If True, return `indices` as well as `vertices` and maybe `mapping`
            (see below).
    
        Returns
        -------
        unique_vertices : (M, 3) ndarray
            Vertices sufficiently separated from one another.
        mapping : (N,) ndarray
            For each element ``vertices[i]`` ($i \in 0..N-1$), the index $j$ to a
            vertex in `unique_vertices` that is less than `theta` degrees from
            ``vertices[i]``.  Only returned if `return_mapping` is True.
        indices : (N,) ndarray
            `indices` gives the reverse of `mapping`.  For each element
            ``unique_vertices[j]`` ($j \in 0..M-1$), the index $i$ to a vertex in
            `vertices` that is less than `theta` degrees from
            ``unique_vertices[j]``.  If there is more than one element of
            `vertices` that is less than theta degrees from `unique_vertices[j]`,
            return the first (lowest index) matching value.  Only return if
            `return_indices` is True.
    """
    pass

def search_descending(a, *args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__ 
    """
    `i` in descending array `a` so `a[i] < a[0] * relative_threshold`
    
        Call ``T = a[0] * relative_threshold``. Return value `i` will be the
        smallest index in the descending array `a` such that ``a[i] < T``.
        Equivalently, `i` will be the largest index such that ``all(a[:i] >= T)``.
        If all values in `a` are >= T, return the length of array `a`.
    
        Parameters
        ----------
        a : ndarray, ndim=1, c-contiguous
            Array to be searched.  We assume `a` is in descending order.
        relative_threshold : float
            Applied threshold will be ``T`` with ``T = a[0] * relative_threshold``.
    
        Returns
        -------
        i : np.intp
            If ``T = a[0] * relative_threshold`` then `i` will be the largest index
            such that ``all(a[:i] >= T)``.  If all values in `a` are >= T then
            `i` will be `len(a)`.
    
        Examples
        --------
        >>> a = np.arange(10, 0, -1, dtype=float)
        >>> np.allclose(a, np.array([10., 9., 8., 7., 6., 5., 4., 3., 2., 1.]))
        True
        >>> search_descending(a, 0.5)
        6
        >>> np.allclose(a < 10 * 0.5, np.array([False, False, False, False, False,
        ... False,  True,  True,  True,  True]))
        True
        >>> search_descending(a, 1)
        1
        >>> search_descending(a, 2)
        0
        >>> search_descending(a, 0)
        10
    """
    pass

def sum_on_blocks_1d(*args, **kwargs): # real signature unknown
    """ Summations on blocks of 1d array """
    pass

def __pyx_unpickle_Enum(*args, **kwargs): # real signature unknown
    pass

# no classes
# variables with complex values

__loader__ = None # (!) real value is '<_frozen_importlib_external.ExtensionFileLoader object at 0x0000019E39F14990>'

__spec__ = None # (!) real value is "ModuleSpec(name='dipy.reconst.recspeed', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x0000019E39F14990>, origin='C:\\\\Users\\\\xukai\\\\Downloads\\\\??2\\\\venv\\\\Lib\\\\site-packages\\\\dipy\\\\reconst\\\\recspeed.cp311-win_amd64.pyd')"

__test__ = {
    'search_descending (line 141)': '`i` in descending array `a` so `a[i] < a[0] * relative_threshold`\n\n    Call ``T = a[0] * relative_threshold``. Return value `i` will be the\n    smallest index in the descending array `a` such that ``a[i] < T``.\n    Equivalently, `i` will be the largest index such that ``all(a[:i] >= T)``.\n    If all values in `a` are >= T, return the length of array `a`.\n\n    Parameters\n    ----------\n    a : ndarray, ndim=1, c-contiguous\n        Array to be searched.  We assume `a` is in descending order.\n    relative_threshold : float\n        Applied threshold will be ``T`` with ``T = a[0] * relative_threshold``.\n\n    Returns\n    -------\n    i : np.intp\n        If ``T = a[0] * relative_threshold`` then `i` will be the largest index\n        such that ``all(a[:i] >= T)``.  If all values in `a` are >= T then\n        `i` will be `len(a)`.\n\n    Examples\n    --------\n    >>> a = np.arange(10, 0, -1, dtype=float)\n    >>> np.allclose(a, np.array([10., 9., 8., 7., 6., 5., 4., 3., 2., 1.]))\n    True\n    >>> search_descending(a, 0.5)\n    6\n    >>> np.allclose(a < 10 * 0.5, np.array([False, False, False, False, False,\n    ... False,  True,  True,  True,  True]))\n    True\n    >>> search_descending(a, 1)\n    1\n    >>> search_descending(a, 2)\n    0\n    >>> search_descending(a, 0)\n    10\n\n    ',
}

