pymoose.computation.dtypes module#

PyMoose implementation of Moose DType.

class pymoose.computation.dtypes.DType(name, short, numpy_dtype, is_native, is_fixedpoint, is_integer, is_float, is_signed, is_boolean, precision=(None, None))[source]#

Bases: pymoose.computation.dtypes._BaseDType

Generic implementation of a Moose DType

property fractional_precision#
property integral_precision#
property is_boolean#
property is_fixedpoint#
property is_float#
property is_integer#
property is_native#
property is_signed#
property name#
property numpy_dtype#
pymoose.computation.dtypes.bool_ = bool#

Boolean DType

pymoose.computation.dtypes.fixed(integ, frac)[source]#

Factory function for creating a fixedpoint DType.

Parameters
  • integ – Integral precision; number of bits to reserve for the integral part of the number.

  • frac – Fractional precision; number of bits to reserve for the fractional part of the number.

Returns

DType object representing a fixedpoint number w/ a particular integral and fractional precision.

pymoose.computation.dtypes.float32 = f32#

32-bit float DType

pymoose.computation.dtypes.float64 = f64#

64-bit float DType

pymoose.computation.dtypes.int32 = i32#

32-bit integer DType

pymoose.computation.dtypes.int64 = i64#

64-bit integer DType

pymoose.computation.dtypes.ring64 = ring64#

64-bit ring integer DType

pymoose.computation.dtypes.uint32 = u32#

32-bit unsigned integer DType

pymoose.computation.dtypes.uint64 = u64#

64-bit unsigned integer DType