numpy.sctype2char() function – Python Last Updated : 18 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report numpy.sctype2char() function return the string representation of a scalar dtype. Syntax : numpy.sctype2char(sctype) Parameters : sctype : [scalar dtype or object] If a sctype is a scalar dtype, the corresponding string character is returned. If an object, sctype2char tries to infer its scalar type and then return the corresponding string character. Return : [str] The string character corresponding to the scalar type. Code #1 : Python3 # Python program explaining # numpy.sctype2char() function # importing numpy as geek import numpy as geek x = geek.array([1., 2-1.j]) gfg = geek.sctype2char(x) print (gfg) Output : D Code #2 : Python3 # Python program explaining # numpy.sctype2char() function # importing numpy as geek import numpy as geek gfg = geek.sctype2char(list) print (gfg) Output : 0 Comment More infoAdvertise with us Next Article numpy.promote_types() function â Python S sanjoy_62 Follow Improve Article Tags : Python Python-numpy Practice Tags : python Similar Reads numpy.typename() function â Python numpy.typename() function return a description for the given data type code. Syntax : numpy.typename(char) Parameters : char : [str] Data type code. Return : [str] Description of the input data type code. Code #1 : Python3 # Python program explaining # numpy.typename() function # importing numpy as 2 min read numpy.maximum_sctype() function â Python numpy.maximum_sctype() function return the scalar type of highest precision of the same kind as the input. Syntax : numpy.maximum_sctype(t) Parameters : t : [dtype or dtype specifier] The input data type. This can be a dtype object or an object that is convertible to a dtype. Return : [dtype] The hi 1 min read numpy.promote_types() function â Python numpy.promote_types() function is a symmetric function which returns the data type with the smallest size and smallest scalar kind to which both type1 and type2 may be safely cast. The returned data type is always in native byte order. Syntax : numpy.promote_types(type1, type2) Parameters : type1 : 1 min read Python str() function The str() function in Python is an in-built function that takes an object as input and returns its string representation. It can be used to convert various data types into strings, which can then be used for printing, concatenation, and formatting. Letâs take a simple example to converting an Intege 3 min read numpy.obj2sctype() function â Python numpy.obj2sctype() function return the scalar dtype or NumPy equivalent of Python type of an object. Syntax : numpy.obj2sctype(rep, default = None) Parameters : rep : [any] The object of which the type is returned. default : [any, optional] If given, this is returned for objects whose types can not 1 min read Numpy - String Functions & Operations NumPy String functions belong to the numpy.char module and are designed to perform element-wise operations on arrays. These functions can help to handle and manipulate string data efficiently.Table of ContentString OperationsString Information String Comparison In this article, weâll explore the var 5 min read Like