def bitdepth(name):
    """Converts the name of numpy.dtype (string) to bit-depth (string)

    Args:
        name (str): Supported types: ['uint8', 'uint16', 'float32']

    Returns:
        str: The NSI equivalent of the datatype for a volume.

    Raise:
        TypeError: If requested type is not supported.

    """
    name = str(name)
    supported_types = {
        'uint8': 'UCHAR',
        'uint16': 'USHORT',
        'float32': 'FLOAT',
        '8': 'UCHAR',
        '16': 'USHORT',
        '32': 'FLOAT'
    }
    if name in supported_types:
        return supported_types[name]

    # If we reach this point, the type is not supported
    raise TypeError(f"bitdepth() argument must be a string, not '{type(name)}'")