Data-type of the array's ith aux data.

        Returns
        -------
        numpy.dtype
            This BaseSparseNDArray's aux data type.
359429
def _aux_type(self, i):
        
        aux_type = ctypes.c_int()
        check_call(_LIB.MXNDArrayGetAuxType(self.handle, i, ctypes.byref(aux_type)))
        return _DTYPE_MX_TO_NP[aux_type.value]
458638
def as_int_array(self):
        
        return self.view(
            type=ndarray,
            dtype=unsigned_int_dtype_with_size_in_bytes(self.itemsize),
        )
1116327
def get(typename):
    
    dt = getPDT(typename) or getCDT(typename)

    if dt is None:
        pdt, nelems = ArrayType.parse(typename)
        if pdt and nelems:
            dt = ArrayType(pdt, nelems)

    return dt
1130699
def serialize_dtype(o):
    
    if len(o) == 0:
        return dict(
            _type='np.dtype',
            descr=str(o))
    return dict(
        _type='np.dtype',
        descr=o.descr)
1210189
def data(self):
        
        if self._data_type == int:
            if self._pb.HasField("int64_data"):
                return self._pb.int64_data
            if self._pb.HasField("int32_data"):
                return self._pb.int32_data
            if self._pb.HasField("uint64_data"):
                return self._pb.uint64_data
            if self._pb.HasField("uint32_data"):
                return self._pb.uint32_data
        elif self._data_type == float:
            if self._pb.HasField("float32_data"):
                return self._pb.float32_data
            if self._pb.HasField("float64_data"):
                return self._pb.float64_data
        elif self._data_type == str:
            return self._pb.string_data
        elif self._data_type == bool:
            return self._pb.bool_data
        elif self._data_type == bytes:
            return self._pb.bytes_data
        return None
378789
def argtypes(self):
        
        if self.dimension is not None:
            result = []
            if "in" in self.direction:
                #The only complication here is that the 'known' dimensionality could actually
                #be a function like "size" that needs information about other variables.
                #If we choose to ignore known shapes, we lose the error checking for the passed
                #in variables from the python side.
                if self.direction == "(inout)" and ":" not in self.dimension:
                    wstr = ", writeable"
                else:
                    wstr = ""

                if ":" in self.dimension or "size" in self.dimension:
                    template = 'ndpointer(dtype={}, ndim={}, flags="F{}")'
                    result.append(template.format(self.pytype, self.D, wstr))
                else:
                    template = 'ndpointer(dtype={}, ndim={}, shape=({}), flags="F{}")'
                    sdim = self.dimension + ("" if self.D > 1 else ",")
                    result.append(template.format(self.pytype, self.D, sdim, wstr))
            elif self.direction == "(out)":
                result.append("c_void_p")

            if self.D > 0 and ":" in self.dimension:
                result.extend(["c_int_p" for i in range(self.D)])
            if (self.direction == "(inout)" and ":" in self.dimension and
                ("allocatable" in self.modifiers or "pointer" in self.modifiers)):
                result.append("c_void_p")
            return result
        else:
            ctype = self.ctype
            if ctype is not None:
                return ["{}_p".format(ctype.lower())]
959057
def get_type(self):
        
        if self.type_idx_value == None:
            self.type_idx_value = self.CM.get_type(self.type_idx)

        return self.type_idx_value
691996
def pandas_dtype(dtype):
    
    # short-circuit
    if isinstance(dtype, np.ndarray):
        return dtype.dtype
    elif isinstance(dtype, (np.dtype, PandasExtensionDtype, ExtensionDtype)):
        return dtype

    # registered extension types
    result = registry.find(dtype)
    if result is not None:
        return result

    # try a numpy dtype
    # raise a consistent TypeError if failed
    try:
        npdtype = np.dtype(dtype)
    except Exception:
        # we don't want to force a repr of the non-string
        if not isinstance(dtype, str):
            raise TypeError("data type not understood")
        raise TypeError("data type '{}' not understood".format(
            dtype))

    # Any invalid dtype (such as pd.Timestamp) should raise an error.
    # np.dtype(invalid_type).kind = 0 for such objects. However, this will
    # also catch some valid dtypes such as object, np.object_ and 'object'
    # which we safeguard against by catching them earlier and returning
    # np.dtype(valid_dtype) before this condition is evaluated.
    if is_hashable(dtype) and dtype in [object, np.object_, 'object', 'O']:
        # check hashability to avoid errors/DeprecationWarning when we get
        # here and `dtype` is an array
        return npdtype
    elif npdtype.kind == 'O':
        raise TypeError("dtype '{}' not understood".format(dtype))

    return npdtype
1294022
def sqrt(self):
        
        if self.isdiagonal:
            return type(self)(x=np.sqrt(self.__x), isdiagonal=True,
                              row_names=self.row_names,
                              col_names=self.col_names,
                              autoalign=self.autoalign)
        elif self.shape[1] == 1: #a vector
            return type(self)(x=np.sqrt(self.__x), isdiagonal=False,
                              row_names=self.row_names,
                              col_names=self.col_names,
                              autoalign=self.autoalign)
        else:
            return type(self)(x=la.sqrtm(self.__x), row_names=self.row_names,
                              col_names=self.col_names,
                              autoalign=self.autoalign)
639377
function(arr) {
                var def = Array.isArray;
                return def ? def(arr) : this.type(arr) == TYPES.a;
            }
406883
def get_dtype(data):
    
    import six
    from ..datageometry import DataGeometry

    if isinstance(data, list):
        return 'list'
    elif isinstance(data, np.ndarray):
        return 'arr'
    elif isinstance(data, pd.DataFrame):
        return 'df'
    elif isinstance(data, (six.string_types, six.text_type, six.binary_type)):
        return 'str'
    elif isinstance(data, DataGeometry):
        return 'geo'
    else:
        raise TypeError('Unsupported data type passed. Supported types: '
                        'Numpy Array, Pandas DataFrame, String, List of strings'
                        ', List of numbers')
287852
def convert_numpy_type(cls, dtype):
        

        m = {
            'int64': cls.DATATYPE_INTEGER64,
            'float64': cls.DATATYPE_FLOAT,
            'object': cls.DATATYPE_TEXT  # Hack. Pandas makes strings into object.
        }

        t = m.get(dtype.name, None)

        if not t:
            raise TypeError(
                "Failed to convert numpy type: '{}' ".format(
                    dtype.name))

        return t
231943
def _convert_type(data_type):  # @NoSelf
        '''
        
        '''
        if data_type in (1, 41):
            dt_string = 'b'
        elif data_type == 2:
            dt_string = 'h'
        elif data_type == 4:
            dt_string = 'i'
        elif data_type in (8, 33):
            dt_string = 'q'
        elif data_type == 11:
            dt_string = 'B'
        elif data_type == 12:
            dt_string = 'H'
        elif data_type == 14:
            dt_string = 'I'
        elif data_type in (21, 44):
            dt_string = 'f'
        elif data_type in (22, 45, 31):
            dt_string = 'd'
        elif data_type == 32:
            dt_string = 'd'
        elif data_type in (51, 52):
            dt_string = 's'
        else:
            dt_string = ''

        return dt_string
77124
def abs(self):
        
        self._validate_dtypes(numeric_only=True)
        return self.__constructor__(query_compiler=self._query_compiler.abs())
598080
def _ndarray_values(self) -> np.ndarray:
        
        if is_extension_array_dtype(self):
            return self.array._ndarray_values
        return self.values
1219885
function inType() {
  var path = this;
  while (path) {
    var _arr3 = arguments;

    for (var _i3 = 0; _i3 < _arr3.length; _i3++) {
      var type = _arr3[_i3];
      if (path.node.type === type) return true;
    }
    path = path.parentPath;
  }

  return false;
}
862224
def data(self, data):
        
        self._assert_shape(data, self._x_indexes, self._y_indexes)
        data[data == -np.inf] = 0.0
        data[data == np.inf] = 0.0
        self._data = data
        self._min_value = np.nanmin(self.data)
        self._max_value = np.nanmax(self.data)
        self._data_x_indexes = list(range(data.shape[0]))
        self._data_y_indexes = list(range(data.shape[1]))
        self._dirty = False