Unique integer identifying the type of this shape, like
        ``MSO_SHAPE_TYPE.TEXT_BOX``.
508631
def shape_type(self):
        
        if self.is_placeholder:
            return MSO_SHAPE_TYPE.PLACEHOLDER
        if self._sp.has_custom_geometry:
            return MSO_SHAPE_TYPE.FREEFORM
        if self._sp.is_autoshape:
            return MSO_SHAPE_TYPE.AUTO_SHAPE
        if self._sp.is_textbox:
            return MSO_SHAPE_TYPE.TEXT_BOX
        msg = 'Shape instance of unrecognized shape type'
        raise NotImplementedError(msg)
1182002
def type(self, value):
        
        if value not in list(defines.Types.values()):
            raise AttributeError
        self._type = value
383926
def dimensional_shape(self) -> typing.Optional[typing.Tuple[int, ...]]:
        """"""
        if not self.__data_and_metadata:
            return None
        return self.__data_and_metadata.dimensional_shape
1006913
def _get_type(self):
        
        point = self._point
        typ = point.type
        bType = None
        if point.smooth:
            if typ == "curve":
                bType = "curve"
            elif typ == "line":
                nextSegment = self._nextSegment
                if nextSegment is not None and nextSegment.type == "curve":
                    bType = "curve"
                else:
                    bType = "corner"
        elif typ in ("move", "line", "curve"):
            bType = "corner"

        if bType is None:
            raise FontPartsError("A %s point can not be converted to a bPoint."
                                         % typ)
        return bType
155822
def _determine_datatype(fields):
    """"""

    # Convert the NRRD type string identifier into a NumPy string identifier using a map
    np_typestring = _TYPEMAP_NRRD2NUMPY[fields['type']]

    # This is only added if the datatype has more than one byte and is not using ASCII encoding
    # Note: Endian is not required for ASCII encoding
    if np.dtype(np_typestring).itemsize > 1 and fields['encoding'] not in ['ASCII', 'ascii', 'text', 'txt']:
        if 'endian' not in fields:
            raise NRRDError('Header is missing required field: "endian".')
        elif fields['endian'] == 'big':
            np_typestring = '>' + np_typestring
        elif fields['endian'] == 'little':
            np_typestring = '<' + np_typestring
        else:
            raise NRRDError('Invalid endian value in header: "%s"' % fields['endian'])

    return np.dtype(np_typestring)
11841
function isForbiddenType(sType) {
				var aTypes = [ButtonType.Up, ButtonType.Back, ButtonType.Unstyled];
				return aTypes.indexOf(sType) !== -1;
			}
998606
def get_human_readable_type(item):
    """"""
    if isinstance(item, (ndarray, MaskedArray)):
        return item.dtype.name
    elif isinstance(item, Image):
        return "Image"
    else:
        text = get_type_string(item)
        if text is None:
            text = to_text_string('unknown')
        else:
            return text[text.find('.')+1:]
1145717
def _check_shape(shape):
    """"""
    if isinstance(shape, tuple):
        for dim in shape:
            if (isinstance(dim, tuple) and len(dim) == 2 and
                    isinstance(dim[0], int) and isinstance(dim[1], int)):
                if dim[0] < 0:
                    raise ValueError("expected low dimension to be >= 0")
                if dim[1] < 0:
                    raise ValueError("expected high dimension to be >= 0")
                if dim[0] > dim[1]:
                    raise ValueError("expected low <= high dimensions")
            else:
                raise TypeError("expected shape dimension to be (int, int)")
    else:
        raise TypeError("expected shape to be tuple of (int, int)")
1071591
public Type getType() {
        if (coordinates[0].length==1) return Type.POINT;
        else if (coordinates[0].length>2) return Type.POLYGON;
        else { //coordinates[0].length==2
            if (Float.isNaN(coordinates[0][1])) return Type.CIRCLE;
            else return Type.BOX;
        }
    }
784292
def get_item_type(self, ttype):
        
        for i in self.map_item:
            if TYPE_MAP_ITEM[i.get_type()] == ttype:
                return i.get_item()
        return None
690575
def has_shape(shape):
    

    def has_shape_inner(arg_id, args, kwargs):
        self = args[0]
        arg = args[arg_id]
        if not hasattr(arg, "shape"):
            raise ExpectedTypeError(arg, ["array"])
        shape_values = []
        for dim in shape:
            if not isinstance(dim, integer_types):
                dim = getattr(self, dim, None)
            shape_values.append(dim)
        if len(shape) != len(arg.shape):
            raise ShapeMismatchError(arg.shape, tuple(shape_values), shape)
        for i, dim in enumerate(shape_values):
            # Allow underspecified dimensions
            if dim is not None and arg.shape[i] != dim:
                raise ShapeMismatchError(arg.shape, shape_values, shape)

    return has_shape_inner
945110
def p_typename(self,t):
    "'"
    t[0] = TypeX(t[1],None) if len(t) == 2 else TypeX(t[1],int(t[3]))
480816
def get_typecast(self):
        """"""
        midx, marker = self.token_next_by(m=(T.Punctuation, '::'))
        nidx, next_ = self.token_next(midx, skip_ws=False)
        return next_.value if next_ else None
111812
def guess_type(s):
    
    sc = s.replace(',', '') # remove comma from potential numbers

    try:
        return int(sc)
    except ValueError:
        pass

    try:
        return float(sc)
    except ValueError:
        pass

    return s
969633
def backing_type_for(value):
        
        if isinstance(value, str):
            vtype = "S"
        elif isinstance(value, bytes):
            vtype = "B"
        # NOTE: numbers.Number check must come **AFTER** bool check since isinstance(True, numbers.Number)
        elif isinstance(value, bool):
            vtype = "BOOL"
        elif isinstance(value, numbers.Number):
            vtype = "N"
        elif isinstance(value, dict):
            vtype = "M"
        elif isinstance(value, list):
            vtype = "L"
        elif isinstance(value, set):
            if not value:
                vtype = "SS"  # doesn't matter, Set(x) should dump an empty set the same for all x
            else:
                inner = next(iter(value))
                if isinstance(inner, str):
                    vtype = "SS"
                elif isinstance(inner, bytes):
                    vtype = "BS"
                elif isinstance(inner, numbers.Number):
                    vtype = "NS"
                else:
                    raise ValueError(f"Unknown set type for inner value {inner!r}")
        else:
            raise ValueError(f"Can't dump unexpected type {type(value)!r} for value {value!r}")
        return vtype
593605
def type(self):
        
        kv_type = ctypes.c_char_p()
        check_call(_LIB.MXKVStoreGetType(self.handle, ctypes.byref(kv_type)))
        return py_str(kv_type.value)
1184733
def box(script):
    
    if script.type is BOOLEAN:
        return "Boolean.valueOf(" + text_type(script.expr) + ")"
    elif script.type is INTEGER:
        return "Integer.valueOf(" + text_type(script.expr) + ")"
    elif script.type is NUMBER:
        return "Double.valueOf(" + text_type(script.expr) + ")"
    else:
        return script.expr