inference_schema/parameter_types/_swagger_from_dtype.py
def _convert_simple_dtype_to_swagger(numpy_type):
        """
        Converts a non dtype sub-array type to swagger valid type

        :param numpy_type:
        :type numpy_type: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        """
        actual_type = numpy_type.name.lower()
        if actual_type in Dtype2Swagger._switcher.keys():
            return Dtype2Swagger._switcher.get(actual_type)
        elif actual_type.startswith('datetime'):
            return {'type': 'string', 'format': 'date-time'}
        elif actual_type.startswith('str'):
            return {'type': 'string'}
        elif actual_type.startswith('bytes') or actual_type.startswith('void'):
            return {'type': 'string', 'format': 'binary'}
        elif actual_type.startswith('timedelta'):
            return {'type': 'string', 'format': 'timedelta'}
        else:
            raise TypeError("We currently do not support extracting schema from data of type {}".format(actual_type))

        Converts a non dtype sub-array type to swagger valid type

        :param numpy_type:
        :type numpy_type: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        
Converts a non dtype sub-array type to swagger valid type
Converts a non dtype sub - array type to swagger valid type
def _convert_simple_dtype_to_swagger(numpy_type):
        actual_type = numpy_type.name.lower()
        if actual_type in Dtype2Swagger._switcher.keys():
            return Dtype2Swagger._switcher.get(actual_type)
        elif actual_type.startswith('datetime'):
            return {'type': 'string', 'format': 'date-time'}
        elif actual_type.startswith('str'):
            return {'type': 'string'}
        elif actual_type.startswith('bytes') or actual_type.startswith('void'):
            return {'type': 'string', 'format': 'binary'}
        elif actual_type.startswith('timedelta'):
            return {'type': 'string', 'format': 'timedelta'}
        else:
            raise TypeError("We currently do not support extracting schema from data of type {}".format(actual_type))
def _convert_simple_dtype_to_swagger ( numpy_type ) : actual_type = numpy_type . name . lower ( ) if actual_type in Dtype2Swagger . _switcher . keys ( ) : return Dtype2Swagger . _switcher . get ( actual_type ) elif actual_type . startswith ( 'datetime' ) : return { 'type' : 'string' , 'format' : 'date-time' } elif actual_type . startswith ( 'str' ) : return { 'type' : 'string' } elif actual_type . startswith ( 'bytes' ) or actual_type . startswith ( 'void' ) : return { 'type' : 'string' , 'format' : 'binary' } elif actual_type . startswith ( 'timedelta' ) : return { 'type' : 'string' , 'format' : 'timedelta' } else : raise TypeError ( "We currently do not support extracting schema from data of type {}" . format ( actual_type ) )
Converts a non dtype sub-array type to swagger valid type
Converts a non dtype sub - array type to swagger valid type
"""
        Converts a non dtype sub-array type to swagger valid type

        :param numpy_type:
        :type numpy_type: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        """
the converted swagger type.
the converted swagger type .
dict
numpy_type
None