inference_schema/parameter_types/_swagger_from_dtype.py
def convert_dtype_to_swagger(dtype):
        """
        Converts a numpy dtype type into a swagger valid type

        :param dtype:
        :type dtype: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        """
        if len(dtype) == 0:
            if dtype.subdtype is None:
                # Simple scalar type
                swag = Dtype2Swagger._convert_simple_dtype_to_swagger(dtype)
            else:
                # Sub-array type
                swag_subtype = Dtype2Swagger.convert_dtype_to_swagger(dtype.subdtype[0])
                swag = Dtype2Swagger.handle_swagger_array(swag_subtype, dtype.subdtype[1])
        else:
            # Structured data type
            properties = dict()
            for field_name in dtype.names:
                properties[field_name] = Dtype2Swagger.convert_dtype_to_swagger(dtype[field_name])
            swag = {'type': 'object', 'properties': properties}
        return swag

        Converts a numpy dtype type into a swagger valid type

        :param dtype:
        :type dtype: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        
Converts a numpy dtype type into a swagger valid type
Converts a numpy dtype type into a swagger valid type
def convert_dtype_to_swagger(dtype):
        if len(dtype) == 0:
            if dtype.subdtype is None:
                swag = Dtype2Swagger._convert_simple_dtype_to_swagger(dtype)
            else:
                swag_subtype = Dtype2Swagger.convert_dtype_to_swagger(dtype.subdtype[0])
                swag = Dtype2Swagger.handle_swagger_array(swag_subtype, dtype.subdtype[1])
        else:
            properties = dict()
            for field_name in dtype.names:
                properties[field_name] = Dtype2Swagger.convert_dtype_to_swagger(dtype[field_name])
            swag = {'type': 'object', 'properties': properties}
        return swag
def convert_dtype_to_swagger ( dtype ) : if len ( dtype ) == 0 : if dtype . subdtype is None : swag = Dtype2Swagger . _convert_simple_dtype_to_swagger ( dtype ) else : swag_subtype = Dtype2Swagger . convert_dtype_to_swagger ( dtype . subdtype [ 0 ] ) swag = Dtype2Swagger . handle_swagger_array ( swag_subtype , dtype . subdtype [ 1 ] ) else : properties = dict ( ) for field_name in dtype . names : properties [ field_name ] = Dtype2Swagger . convert_dtype_to_swagger ( dtype [ field_name ] ) swag = { 'type' : 'object' , 'properties' : properties } return swag
Converts a numpy dtype type into a swagger valid type
Converts a numpy dtype type into a swagger valid type
"""
        Converts a numpy dtype type into a swagger valid type

        :param dtype:
        :type dtype: numpy.dtype
        :return: the converted swagger type.
        :rtype: dict
        """ # Simple scalar type # Sub-array type # Structured data type
the converted swagger type.
the converted swagger type .
dict
dtype
None