numpy.mintypecode

numpy.mintypecode(typechars, typeset='GDFgdf', default='d')

Return a minimum data type character from typeset that handles all typechars given

The returned type character must be the smallest size such that an array of the returned type can handle the data from an array of type t for each t in typechars (or if typechars is an array, then its dtype.char).

If the typechars does not intersect with the typeset, then default is returned.

If t in typechars is not a string then t=asarray(t).dtype.char is applied.

Previous topic

numpy.sctype2char

Next topic

Input and output

This Page

Quick search