Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Calcul scientifique
avec Python
Voir le programme détaillé
Module « scipy.linalg.blas »

Fonction find_best_blas_type - module scipy.linalg.blas

Signature de la fonction find_best_blas_type

def find_best_blas_type(arrays=(), dtype=None) 

Description

help(scipy.linalg.blas.find_best_blas_type)

Find best-matching BLAS/LAPACK type.

Arrays are used to determine the optimal prefix of BLAS routines.

Parameters
----------
arrays : sequence of ndarrays, optional
    Arrays can be given to determine optimal prefix of BLAS
    routines. If not given, double-precision routines will be
    used, otherwise the most generic type in arrays will be used.
dtype : str or dtype, optional
    Data-type specifier. Not used if `arrays` is non-empty.

Returns
-------
prefix : str
    BLAS/LAPACK prefix character.
dtype : dtype
    Inferred Numpy data type.
prefer_fortran : bool
    Whether to prefer Fortran order routines over C order.

Examples
--------
>>> import numpy as np
>>> import scipy.linalg.blas as bla
>>> rng = np.random.default_rng()
>>> a = rng.random((10,15))
>>> b = np.asfortranarray(a)  # Change the memory layout order
>>> bla.find_best_blas_type((a,))
('d', dtype('float64'), False)
>>> bla.find_best_blas_type((a*1j,))
('z', dtype('complex128'), False)
>>> bla.find_best_blas_type((b,))
('d', dtype('float64'), True)



Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les compléments
Voir le programme détaillé