Returns the dtype correspond to this dtype's real part.
971906
def real_dtype(self):
        """"""
        base = self.base_dtype
        if base == complex64:
            return float32
        elif base == complex128:
            return float64
        else:
            return self
193147
def _realpart(self, f):
        """"""
        def f_re(x, **kwargs):
            result = np.asarray(f(x, **kwargs),
                                dtype=self.scalar_out_dtype)
            return result.real

        if is_real_dtype(self.out_dtype):
            return f
        else:
            return self.real_space.element(f_re)
412652
def _parse_dtype(self, space):
    
    if isinstance(space, gym.spaces.Discrete):
      return tf.int32
    if isinstance(space, gym.spaces.Box):
      return tf.float32
    raise NotImplementedError()
450396
def real(self):
        """"""
        return matrix(self.tt.real(), n=self.n, m=self.m)
357902
def range_type_to_dtype(range_type: str) -> Optional[tf.DType]:
    ''''''
    range2dtype = {
        'real': tf.float32,
        'int': tf.int32,
        'bool': tf.bool
    }
    return range2dtype[range_type]
1354988
public org.tensorflow.framework.DataType getType() {
    if (valueCase_ == 6) {
      org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(
          (java.lang.Integer) value_);
      return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
    }
    return org.tensorflow.framework.DataType.DT_INVALID;
  }
1270830
def DtypeToType(self, dtype):
    """"""
    if dtype.char in np.typecodes['AllFloat']:
      return self.fs_proto.FLOAT
    elif (dtype.char in np.typecodes['AllInteger'] or dtype == np.bool or
          np.issubdtype(dtype, np.datetime64) or
          np.issubdtype(dtype, np.timedelta64)):
      return self.fs_proto.INT
    else:
      return self.fs_proto.STRING
906074
public static DataType getDtypeFromContext() {
        try {
            lock.readLock().lock();

            if (dtype == null) {
                lock.readLock().unlock();
                lock.writeLock().lock();

                if (dtype == null)
                    dtype = getDtypeFromContext(Nd4jContext.getInstance().getConf().getProperty("dtype"));

                lock.writeLock().unlock();
                lock.readLock().lock();
            }

            return dtype;
        } finally {
            lock.readLock().unlock();
        }
    }
315635
def cast(self, dtype):
        
        self.dtype = dtype
        if self._data is None:
            return
        with autograd.pause():
            self._data = [i.astype(dtype) for i in self._data]
            if self._grad is None:
                return
            self._grad = [i.astype(dtype) for i in self._grad]
            autograd.mark_variables(self._data, self._grad, self.grad_req)
911842
def values(self):
        
        dtypes = [col.dtype for col in self.columns]
        if len(set(dtypes)) > 1:
            dtype = object
        else:
            dtype = None
        return np.array(self.columns, dtype=dtype).T
25425
def _dtype_array(self):
        """"""
        attrtype = []
        attrdiff = []

        for key in self._headers:
            if self.attr[key][0] == 'continuous':
                attrtype.append(1)
            else:
                attrtype.append(0)
            attrdiff.append(self.attr[key][3])

        attrtype = np.array(attrtype)
        cidx = np.where(attrtype == 1)[0]
        didx = np.where(attrtype == 0)[0]

        attrdiff = np.array(attrdiff)

        return attrdiff, cidx, didx
851595
def type(self):
        ""
        if self._type is None and len(self):
            self._type = self.values()[0].__class__
        return self._type
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)
1141727
def _ctypes_dtype(parameter):
    
    ctype = parameter.ctype
    if ctype is None:
        if parameter.kind is not None:
            return "{}({})".format(parameter.dtype, parameter.kind)
        else:
            return parameter.dtype
    else:
        return"{}({})".format(parameter.dtype, ctype)
1013689
def get_t(self):
        '''
        
        '''
        if isinstance(self.__t, int) is False:
            raise TypeError("The type of __t must be int.")
        return self.__t
231402
def is_real_floating_dtype(dtype):
    """"""
    dtype = np.dtype(dtype)
    return np.issubsctype(getattr(dtype, 'base', None), np.floating)
735055
def return_real_id(self):
        
        if self._prepopulated is False:
            raise errors.EmptyDatabase(self.dbpath)
        else:
            return return_real_id_base(self.dbpath, self._set_object)